org.apache.catalina.util
Class XMLWriter
java.lang.Object
org.apache.catalina.util.XMLWriter
public class XMLWriter
extends java.lang.Object
XMLWriter helper class.
- Remy Maucherat
void | sendData() - Send data and reinitializes buffer.
|
String | toString() - Retrieve generated XML.
|
void | writeData(String data) - Write data.
|
void | writeElement(String namespace, String namespaceInfo, String name, int type) - Write an element.
|
void | writeElement(String namespace, String name, int type) - Write an element.
|
void | writeProperty(String namespace, String name) - Write property to the XML.
|
void | writeProperty(String namespace, String name, String value) - Write property to the XML.
|
void | writeProperty(String namespace, String namespaceInfo, String name, String value) - Write property to the XML.
|
void | writeText(String text) - Write text.
|
void | writeXMLHeader() - Write XML Header.
|
CLOSING
public static final int CLOSING
Closing tag.
- 1
NO_CONTENT
public static final int NO_CONTENT
Element with no content.
- 2
OPENING
public static final int OPENING
Opening tag.
- 0
buffer
protected StringBuffer buffer
Buffer.
writer
protected Writer writer
Writer.
XMLWriter
public XMLWriter()
Constructor.
XMLWriter
public XMLWriter(Writer writer)
Constructor.
sendData
public void sendData()
throws IOException
Send data and reinitializes buffer.
toString
public String toString()
Retrieve generated XML.
- String containing the generated XML
writeData
public void writeData(String data)
Write data.
data
- Data to append
writeElement
public void writeElement(String namespace,
String namespaceInfo,
String name,
int type)
Write an element.
namespace
- Namespace abbreviationnamespaceInfo
- Namespace infoname
- Element nametype
- Element type
writeElement
public void writeElement(String namespace,
String name,
int type)
Write an element.
namespace
- Namespace abbreviationname
- Element nametype
- Element type
writeProperty
public void writeProperty(String namespace,
String name)
Write property to the XML.
namespace
- Namespacename
- Property name
writeProperty
public void writeProperty(String namespace,
String name,
String value)
Write property to the XML.
namespace
- Namespacename
- Property namevalue
- Property value
writeProperty
public void writeProperty(String namespace,
String namespaceInfo,
String name,
String value)
Write property to the XML.
namespace
- NamespacenamespaceInfo
- Namespace infoname
- Property namevalue
- Property value
writeText
public void writeText(String text)
Write text.
text
- Text to append
writeXMLHeader
public void writeXMLHeader()
Write XML Header.
Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.