public abstract class XmlFormatter
extends java.lang.Object
Document
s and Tag
s as XML to a Writer
.Modifier | Constructor and Description |
---|---|
protected |
XmlFormatter() |
Modifier and Type | Method and Description |
---|---|
abstract void |
write(Document document,
java.io.Writer writer)
Writes the given
Document as an XML document to the given Writer . |
void |
write(Tag rootTag,
java.io.Writer writer)
Writes the given
Tag as the root of an XML document to the given Writer . |
protected static void |
writeDocument(Document document,
javax.xml.transform.sax.TransformerHandler transformerHandler) |
protected static void writeDocument(Document document, javax.xml.transform.sax.TransformerHandler transformerHandler) throws XmlWriteException
XmlWriteException
public final void write(Tag rootTag, java.io.Writer writer) throws XmlWriteException
Tag
as the root of an XML document to the given Writer
.rootTag
- the Tag
that represents the root of the document.writer
- the Writer
to output to.XmlWriteException
- in the event of a failure outputting to the Writer
.public abstract void write(Document document, java.io.Writer writer) throws XmlWriteException
Document
as an XML document to the given Writer
.document
- the Document
to write.writer
- the Writer
to output to.XmlWriteException
- in the event of a failure outputting to the Writer
.