public interface XMLWriter
| Modifier and Type | Method and Description |
|---|---|
void |
closeDocument()
Writes XML end tags to start tags which have not been terminated to output.
|
void |
closeElement()
Writes an XML end tag to output.
|
void |
closeWriter()
Closes the underlying writer.
|
XMLStreamWriter |
getXmlStreamWriter()
Provides the underlying XmlStreamWriter.
|
void |
openDocument()
Writes the XML declaration to output.
|
void |
openDocument(String encoding,
String version)
Writes the XML declaration to ouput.
|
void |
openElement(String name)
Writes an XML start tag to output.
|
void |
openElement(String name,
String... attributeNameValuePairs)
Writes an XML start tag to output.
|
void |
writeAttribute(String name,
String value)
Writes an XML attribute to output.
|
void |
writeCData(String cData)
Writes non-parsed character data to ouput.
|
void |
writeCharacters(String characters)
Writes characters to output.
|
void |
writeElement(String name,
String value)
Writes an XML start tag, value, and end tag to ouput.
|
void |
writeElement(String name,
String value,
String... attributeNameValuePairs)
Writes an XML start tag with attributes, value, and end tag to ouput.
|
void openDocument()
encoding - the encoding the XML file.version - the version of the XML file.void openDocument(String encoding, String version)
encoding - the encoding the XML file.version - the version of the XML file.void openElement(String name)
name - the name of the XML element.void openElement(String name, String... attributeNameValuePairs)
name - the name of the XML element.attributeNameValuePairs - the attributes of the XML element given in key-value-pairs.void writeAttribute(String name, String value)
name - the attribute name.value - the attribute value.void writeElement(String name, String value)
name - the name of the XML element.value - the value of the XML element.void writeElement(String name, String value, String... attributeNameValuePairs)
name - the name of the XML element.value - the value of the XML element.attributeNameValuePairs - the attributes of the XML element given in key-value-pairs.void writeCharacters(String characters)
characters - the characters to write.void writeCData(String cData)
cData - character data to write.XMLStreamWriter getXmlStreamWriter()
void closeElement()
name - the name of the XML element.void closeDocument()
encoding - the encoding of the XML file.void closeWriter()
Copyright © 2015 AmpleCode. All rights reserved.