|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IXmlWriter
Simple interface for creating basic xml documents. Performs basic validation and escaping. Not namespace aware (may reconsider this later).
Method Summary | |
---|---|
IXmlWriter |
attribute(CharSequence name,
CharSequence value)
Writes an attribute of an element. |
IXmlWriter |
closeDocument()
Closes all pending elements. |
IXmlWriter |
closeElement()
Closes the last element written. |
IXmlWriter |
content(CharSequence content)
Writes content. |
IXmlWriter |
openElement(CharSequence elementName)
Writes the start of an element. |
IXmlWriter |
startDocument()
Starts a document by writing a prolog. |
Method Detail |
---|
IXmlWriter startDocument() throws IOException
OperationNotAllowedException
- if called after the first element has been written
or once a prolog has already been written
IOException
IXmlWriter openElement(CharSequence elementName) throws IOException
elementName
- the name of the element, not null
InvalidXmlException
- if the name is not valid for an xml element
OperationNotAllowedException
- if called after the first element has been closed
IOException
IXmlWriter attribute(CharSequence name, CharSequence value) throws IOException
openElement(CharSequence)
or attribute(java.lang.CharSequence, java.lang.CharSequence)
.
name
- the attribute name, not nullvalue
- the attribute value, not null
InvalidXmlException
- if the name is not valid for an xml attribute
or if a value for the attribute has already been written
OperationNotAllowedException
- if called after content(CharSequence)
or closeElement()
or before any call to openElement(CharSequence)
IOException
IXmlWriter content(CharSequence content) throws IOException
content
- the content to write
OperationNotAllowedException
- if called before any call to openElement(java.lang.CharSequence)
or after the first element has been closed
IOException
IXmlWriter closeElement() throws IOException
OperationNotAllowedException
- if called before any call to openElement(java.lang.CharSequence)
or after the first element has been closed
IOException
IXmlWriter closeDocument() throws IOException
OperationNotAllowedException
- if called before any call to openElement(java.lang.CharSequence)
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |