Constructor and Description |
---|
XMLWriter(boolean encodeText)
Creates a new XMLWriter.
|
Modifier and Type | Method and Description |
---|---|
String |
toXML(Element element)
returns the XML as a String
|
void |
writeXML(Writer writer,
Element element)
Writes the XML of an Element to a Writer.
|
public XMLWriter(boolean encodeText)
encodeText
- Determines whether or not text components (text
content, tag names, attribute names, and attribute values) should be
encoded with escapes when written. Use false if these values are already
encoded.public void writeXML(Writer writer, Element element) throws IOException
writer
- The Writer to which the XML will be written.element
- The element whose XML will be written.IOException
- if a write operation fails.