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.IOException
void printDoctype(DTD dtd) throws java.io.IOException
DTD
.dtd
- The dtd to be printed.java.io.IOException
void printDocument(XMLDocument doc) throws java.io.IOException
XMLDocument
.elem
- The document to be printed.java.io.IOException
void printElement(XMLElement elem) throws java.io.IOException
XMLElement
.elem
- The element to be printed.java.io.IOException
void printDocumentFragment(XMLDocumentFragment dfrag) throws java.io.IOException
XMLDocumentFragment
object.dfrag
- The document fragment to be printed.java.io.IOException
void printTextNode(XMLText text) throws java.io.IOException
XMLText
nodetext
- The text node.java.io.IOException
void printComment(XMLComment comment) throws java.io.IOException
XMLComment
nodecomment
- The comment node.java.io.IOException
void printCDATASection(XMLCDATA cdata) throws java.io.IOException
XMLCDATA
nodecdata
- The XMLCDATA node.java.io.IOException
void printProcessingInstruction(XMLPI pi) throws java.io.IOException
XMLPI
nodepi
- The XMLPI node.java.io.IOException
void printAttribute(XMLAttr attr) throws java.io.IOException
XMLAttr
nodeattr
- The XMLAttr node.java.io.IOException
void printEntityReference(XMLEntityReference en) throws java.io.IOException
XMLEntityReference
nodeen
- The XMLEntityReference node.java.io.IOException
void printChildNodes(XMLNode node) throws java.io.IOException
XMLNode
node
- The node whose children are to be printed.java.io.IOException
void printAttributeNodes(XMLElement elem) throws java.io.IOException
XMLElement
elem
- 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