public interface IXmlWriter
| Modifier and Type | Method and Description |
|---|---|
IXmlWriter |
attribute(java.lang.CharSequence name,
java.lang.CharSequence value)
Writes an attribute of an element.
|
IXmlWriter |
closeDocument()
Closes all pending elements.
|
IXmlWriter |
closeElement()
Closes the last element written.
|
IXmlWriter |
content(java.lang.CharSequence content)
Writes content.
|
IXmlWriter |
openElement(java.lang.CharSequence elementName)
Writes the start of an element.
|
IXmlWriter |
startDocument()
Starts a document by writing a prolog.
|
IXmlWriter startDocument() throws java.io.IOException
OperationNotAllowedException - if called after the first element has been written
or once a prolog has already been writtenjava.io.IOExceptionIXmlWriter openElement(java.lang.CharSequence elementName) throws java.io.IOException
elementName - the name of the element, not nullInvalidXmlException - if the name is not valid for an xml elementOperationNotAllowedException - if called after the first element has been closedjava.io.IOExceptionIXmlWriter attribute(java.lang.CharSequence name, java.lang.CharSequence value) throws java.io.IOException
openElement(CharSequence)
or attribute(java.lang.CharSequence, java.lang.CharSequence).name - the attribute name, not nullvalue - the attribute value, not nullInvalidXmlException - if the name is not valid for an xml attribute
or if a value for the attribute has already been writtenOperationNotAllowedException - if called after content(CharSequence)
or closeElement() or before any call to openElement(CharSequence)java.io.IOExceptionIXmlWriter content(java.lang.CharSequence content) throws java.io.IOException
content - the content to writeOperationNotAllowedException - if called before any call to openElement(java.lang.CharSequence)
or after the first element has been closedjava.io.IOExceptionIXmlWriter closeElement() throws java.io.IOException
OperationNotAllowedException - if called before any call to openElement(java.lang.CharSequence)
or after the first element has been closedjava.io.IOExceptionIXmlWriter closeDocument() throws java.io.IOException
OperationNotAllowedException - if called before any call to openElement(java.lang.CharSequence)java.io.IOException