|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
XML document writer.
This interface is used to implement any kind of high-level output stream that writes XML documents. XML documents are written in a "push" fashion, where each item (node tag, attribute, and text content) is written individually by request.
Implementations of this interface should provide at least one constructor that takes some kind of output text stream (such as a java.io.Writer or java.io.OutputStream) as input. For example:
class MyXmlWriter implements tribble.xml.XmlWriterI { // Constructor public MyXmlWriter(java.io.Writer out) { ... } ... }
XmlReaderI
Field Summary | |
static java.lang.String |
REV
Revision information. |
Method Summary | |
void |
writeAttribute(XmlAttributeI attr)
Write an XML element attribute to this XML output stream. |
void |
writeComment(java.lang.String text)
Write a comment to this XML output stream. |
void |
writeElement(XmlElementI ent)
Write an XML element to this XML output stream. |
void |
writeText(java.lang.String text)
Write the text content of the current XML element to this XML output stream. |
Field Detail |
public static final java.lang.String REV
Method Detail |
public void writeElement(XmlElementI ent) throws java.io.IOException
ent
- An XML tagged element.
java.io.IOException
- Thrown if an I/O (write) error occurs.
java.lang.IllegalStateException
- (unchecked)
Thrown if this writer is not in the proper state for writing an element.public void writeAttribute(XmlAttributeI attr) throws java.io.IOException
attr
- An XML element attribute.
java.io.IOException
- Thrown if an I/O (write) error occurs.
java.lang.IllegalStateException
- (unchecked)
Thrown if this writer is not in the proper state for writing an element
attribute.public void writeText(java.lang.String text) throws java.io.IOException
text
- Text contents of the current XML element.
java.io.IOException
- Thrown if an I/O (write) error occurs.
java.lang.IllegalStateException
- (unchecked)
Thrown if this writer is not in the proper state for writing the text
contents of an element.public void writeComment(java.lang.String text) throws java.io.IOException
text
- Comment text.
java.io.IOException
- Thrown if an I/O (write) error occurs.
java.lang.IllegalStateException
- (unchecked)
Thrown if this writer is not in the proper state for writing a comment.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |