|
Oracle® Database XML Java API Reference 11g Release 1 (11.1) B28391-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.xml.parser.v2.XMLPrintDriver
public class XMLPrintDriver
The XMLPrintDriver
implements PrintDriver
interface.
Field Summary | |
---|---|
protected java.util.Hashtable |
nsDeclToPrint |
protected java.util.Vector |
nsVector |
protected XMLOutputStream |
out XMLOutputStream to print the serialized form. |
protected int |
prefixCount |
protected java.util.Vector |
prefixVector |
protected int |
prevSize |
Constructor Summary | |
---|---|
XMLPrintDriver(java.io.OutputStream os) Create a new PrintDriver to output XML to OutputStream |
|
XMLPrintDriver(java.io.PrintWriter pw) Create a new PrintDriver to output XML to PrintWriter |
Method Summary | |
---|---|
void |
close() Closes the output stream or print writer. |
void |
close(int option) Closes the output stream or print writer based on option Legal values are: XMLOutputStream.REUSE and XMLOutputStream.NO_REUSE. |
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 |
protected void |
printNsDecls(XMLElement elem) Print all namespace decl required in the current start elem |
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 |
setFormatPrettyPrint(boolean val) Sets the pretty format print |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected XMLOutputStream out
protected java.util.Vector prefixVector
protected java.util.Vector nsVector
protected int prevSize
protected int prefixCount
protected java.util.Hashtable nsDeclToPrint
Constructor Detail |
---|
public XMLPrintDriver(java.io.PrintWriter pw)
pw
- - PrintWriter to use for outputpublic XMLPrintDriver(java.io.OutputStream os)
os
- - OutputStream to use for outputMethod Detail |
---|
public void setEncoding(java.lang.String enc) throws java.io.IOException
setEncoding
in interface PrintDriver
enc
- The encoding of the document being printed.java.io.IOException
public void setFormatPrettyPrint(boolean val)
val
- boolean valuepublic void printDoctype(DTD dtd) throws java.io.IOException
DTD
.printDoctype
in interface PrintDriver
dtd
- The dtd to be printed.java.io.IOException
public void printDocument(XMLDocument doc) throws java.io.IOException
XMLDocument
.printDocument
in interface PrintDriver
doc
- The document to be printed.java.io.IOException
public void printElement(XMLElement elem) throws java.io.IOException
XMLElement
.printElement
in interface PrintDriver
elem
- The element to be printed.java.io.IOException
public void printDocumentFragment(XMLDocumentFragment dfrag) throws java.io.IOException
XMLDocumentFragment
object.printDocumentFragment
in interface PrintDriver
dfrag
- The document fragment to be printed.java.io.IOException
public void printTextNode(XMLText text) throws java.io.IOException
XMLText
nodeprintTextNode
in interface PrintDriver
text
- The text node.java.io.IOException
public void printComment(XMLComment comment) throws java.io.IOException
XMLComment
nodeprintComment
in interface PrintDriver
comment
- The comment node.java.io.IOException
public void printCDATASection(XMLCDATA cdata) throws java.io.IOException
XMLCDATA
nodeprintCDATASection
in interface PrintDriver
cdata
- The XMLCDATA node.java.io.IOException
public void printProcessingInstruction(XMLPI pi) throws java.io.IOException
XMLPI
nodeprintProcessingInstruction
in interface PrintDriver
pi
- The XMLPI node.java.io.IOException
public void printAttribute(XMLAttr attr) throws java.io.IOException
XMLAttr
nodeprintAttribute
in interface PrintDriver
attr
- The XMLAttr node.java.io.IOException
public void printEntityReference(XMLEntityReference en) throws java.io.IOException
XMLEntityReference
nodeprintEntityReference
in interface PrintDriver
en
- The XMLEntityReference node.java.io.IOException
public final void printChildNodes(XMLNode node) throws java.io.IOException
XMLNode
printChildNodes
in interface PrintDriver
node
- The node whose children are to be printed.java.io.IOException
public final void printAttributeNodes(XMLElement elem) throws java.io.IOException
XMLElement
printAttributeNodes
in interface PrintDriver
elem
- The elem whose attributes are to be printed.java.io.IOException
public void flush() throws java.io.IOException
flush
in interface PrintDriver
java.io.IOException
public void close() throws java.io.IOException
close
in interface PrintDriver
java.io.IOException
public void close(int option) throws java.io.IOException
option
- determines whether output stream or print writer has to be closed.java.io.IOException
protected void printNsDecls(XMLElement elem) throws java.io.IOException
java.io.IOException
- - If any error occurs while printing
|
Oracle® Database XML Java API Reference 11g Release 1 (11.1) B28391-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |