| Constructor and Description |
|---|
OutputStreamXMLOutput(OutputStream os)
Constructor.
|
OutputStreamXMLOutput(OutputStream os,
String stylesheet)
Constructor.
|
OutputStreamXMLOutput(Writer writer)
Constructor.
|
OutputStreamXMLOutput(Writer writer,
String stylesheet) |
| 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 |
flush() |
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.
|
public OutputStreamXMLOutput(@WillCloseWhenClosed OutputStream os)
os - OutputStream to write XML output topublic OutputStreamXMLOutput(@WillCloseWhenClosed Writer writer)
writer - Writer to write XML output topublic OutputStreamXMLOutput(@WillCloseWhenClosed OutputStream os, String stylesheet)
os - OutputStream to write XML output tostylesheet - name of stylesheetpublic OutputStreamXMLOutput(@WillCloseWhenClosed Writer writer, String stylesheet)
public void beginDocument()
throws IOException
XMLOutputbeginDocument in interface XMLOutputIOExceptionpublic void openTag(String tagName) throws IOException
XMLOutputopenTag in interface XMLOutputtagName - the tag nameIOExceptionpublic void openTag(String tagName, XMLAttributeList attributeList) throws IOException
XMLOutputopenTag in interface XMLOutputtagName - the tag nameattributeList - the attributesIOExceptionpublic void openCloseTag(String tagName) throws IOException
XMLOutputopenCloseTag in interface XMLOutputtagName - the tag nameIOExceptionpublic void openCloseTag(String tagName, XMLAttributeList attributeList) throws IOException
XMLOutputopenCloseTag in interface XMLOutputtagName - the tag nameattributeList - the attributesIOExceptionpublic void startTag(String tagName) throws IOException
XMLOutputstartTag in interface XMLOutputtagName - the tag nameIOExceptionpublic void addAttribute(String name, String value) throws IOException
XMLOutputaddAttribute in interface XMLOutputname - the attribute name.value - the attribute value, unescaped.IOExceptionpublic void stopTag(boolean close)
throws IOException
XMLOutputstopTag in interface XMLOutputclose - true if the element has no content.IOExceptionpublic void closeTag(String tagName) throws IOException
XMLOutputcloseTag in interface XMLOutputtagName - the tag nameIOExceptionpublic void writeText(String text) throws IOException
XMLOutputwriteText in interface XMLOutputtext - the text to writeIOExceptionpublic void writeCDATA(String cdata) throws IOException
XMLOutputwriteCDATA in interface XMLOutputcdata - the character data to writeIOExceptionpublic void flush()
throws IOException
IOException@DischargesObligation public void finish() throws IOException
XMLOutputfinish in interface XMLOutputIOExceptionCopyright © 2003–2015. All rights reserved.