public interface PrintDriver
PrintDriver defines methods used to print XML documents represented as DOM trees.| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the output stream or print writer
|
void |
flush()
Flushes the output stream or print writer
|
void |
printAttribute(XMLAttr attr)
Prints a
XMLAttr node |
void |
printAttributeNodes(XMLElement elem)
Calls print method for each attribute of the
XMLElement |
void |
printCDATASection(XMLCDATA cdata)
Prints a
XMLCDATA node |
void |
printChildNodes(XMLNode node)
Calls print method for each child of the
XMLNode |
void |
printComment(XMLComment comment)
Prints a
XMLComment node |
void |
printDoctype(DTD dtd)
Prints an
DTD. |
void |
printDocument(XMLDocument doc)
Prints an
XMLDocument. |
void |
printDocumentFragment(XMLDocumentFragment dfrag)
Prints an empty
XMLDocumentFragment object. |
void |
printElement(XMLElement elem)
Prints an
XMLElement. |
void |
printEntityReference(XMLEntityReference en)
Prints a
XMLEntityReference node |
void |
printProcessingInstruction(XMLPI pi)
Prints a
XMLPI node |
void |
printTextNode(XMLText text)
Prints a
XMLText node |
void |
setEncoding(java.lang.String enc)
Sets the encoding of the print driver.
|
void setEncoding(java.lang.String enc)
throws java.io.IOException
enc - The encoding of the document being printed.java.io.IOExceptionvoid printDoctype(DTD dtd) throws java.io.IOException
DTD.dtd - The dtd to be printed.java.io.IOExceptionvoid printDocument(XMLDocument doc) throws java.io.IOException
XMLDocument.elem - The document to be printed.java.io.IOExceptionvoid printElement(XMLElement elem) throws java.io.IOException
XMLElement.elem - The element to be printed.java.io.IOExceptionvoid printDocumentFragment(XMLDocumentFragment dfrag) throws java.io.IOException
XMLDocumentFragment object.dfrag - The document fragment to be printed.java.io.IOExceptionvoid printTextNode(XMLText text) throws java.io.IOException
XMLText nodetext - The text node.java.io.IOExceptionvoid printComment(XMLComment comment) throws java.io.IOException
XMLComment nodecomment - The comment node.java.io.IOExceptionvoid printCDATASection(XMLCDATA cdata) throws java.io.IOException
XMLCDATA nodecdata - The XMLCDATA node.java.io.IOExceptionvoid printProcessingInstruction(XMLPI pi) throws java.io.IOException
XMLPI nodepi - The XMLPI node.java.io.IOExceptionvoid printAttribute(XMLAttr attr) throws java.io.IOException
XMLAttr nodeattr - The XMLAttr node.java.io.IOExceptionvoid printEntityReference(XMLEntityReference en) throws java.io.IOException
XMLEntityReference nodeen - The XMLEntityReference node.java.io.IOExceptionvoid printChildNodes(XMLNode node) throws java.io.IOException
XMLNodenode - The node whose children are to be printed.java.io.IOExceptionvoid printAttributeNodes(XMLElement elem) throws java.io.IOException
XMLElementelem - The elem whose attributes are to be printed.java.io.IOException
void flush()
throws java.io.IOException
java.io.IOException
void close()
throws java.io.IOException
java.io.IOException