@CleanupObligation public interface XMLOutput
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(String name,
String value)
Add an attribute to a started tag.
|
void |
beginDocument()
Begin the XML document.
|
void |
closeTag(String tagName)
Close tag with given name.
|
void |
finish()
Finish writing XML output, closing any underlying resources (such as
output streams).
|
void |
openCloseTag(String tagName)
Open and close tag with given name.
|
void |
openCloseTag(String tagName,
XMLAttributeList attributeList)
Open and close tag with given name and given attributes.
|
void |
openTag(String tagName)
Open a tag with given name.
|
void |
openTag(String tagName,
XMLAttributeList attributeList)
Open a tag with given name and given attributes.
|
void |
startTag(String tagName)
Start a tag, with the intention of adding attributes.
|
void |
stopTag(boolean close)
End a started tag.
|
void |
writeCDATA(String cdata)
Write a CDATA section to the XML document.
|
void |
writeText(String text)
Write text to the XML document.
|
void beginDocument()
throws IOException
IOExceptionvoid openTag(String tagName) throws IOException
tagName - the tag nameIOExceptionvoid openTag(String tagName, XMLAttributeList attributeList) throws IOException
tagName - the tag nameattributeList - the attributesIOExceptionvoid startTag(String tagName) throws IOException
tagName - the tag nameIOExceptionvoid addAttribute(String name, String value) throws IOException
name - the attribute name.value - the attribute value, unescaped.IOExceptionvoid stopTag(boolean close)
throws IOException
close - true if the element has no content.IOExceptionvoid openCloseTag(String tagName) throws IOException
tagName - the tag nameIOExceptionvoid openCloseTag(String tagName, XMLAttributeList attributeList) throws IOException
tagName - the tag nameattributeList - the attributesIOExceptionvoid closeTag(String tagName) throws IOException
tagName - the tag nameIOExceptionvoid writeText(String text) throws IOException
text - the text to writeIOExceptionvoid writeCDATA(String cdata) throws IOException
cdata - the character data to writeIOException@DischargesObligation void finish() throws IOException
IOExceptionCopyright © 2003–2015. All rights reserved.