public class XmlWriter
extends java.lang.Object
Constructor and Description |
---|
XmlWriter() |
Modifier and Type | Method and Description |
---|---|
void |
chardata(java.lang.String text)
Formats cdata for XML
|
void |
endElement(java.lang.String elem)
Formats a closing XML tag
|
byte[] |
getBytes()
Gets this writer's contents as a byte array (already appends a \n)
|
void |
reset()
Resets this XmlWriter so it can be used again
|
void |
startElement(java.lang.String elem)
Formats an opening XML tag
|
java.lang.String |
toString()
Gets this writer's contents as string (already appends a \n).
|
void |
write(java.lang.String text)
Write the given text.
|
public void reset()
public void write(java.lang.String text)
public java.lang.String toString()
toString
in class java.lang.Object
getBytes()
public byte[] getBytes()
public void startElement(java.lang.String elem)
elem
- The element of the opening tagpublic void endElement(java.lang.String elem)
elem
- The element of the closing tagpublic void chardata(java.lang.String text)
text
- The character data to be formatted