Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Application Server XML Java API Reference 10g Release 2 (10.1.2) Part no. B12024-03 September 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.xml.parser.v2
Class XMLPrintDriver

    java.lang.Object
      |
      +--oracle.xml.parser.v2.XMLPrintDriver

All Implemented Interfaces:
  PrintDriver

public class XMLPrintDriver
extends java.lang.Object
implements PrintDriver

The `XMLPrintDriver` implements `PrintDriver` interface.

Field Summary
`protected XMLOutputStream` | `out` XMLOutputStream to print the serialized form.

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` | `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` | `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

### out

    protected XMLOutputStream out

  XMLOutputStream to print the serialized form.

Constructor Detail

### XMLPrintDriver

    public XMLPrintDriver(java.io.PrintWriter pw)

  Create a new PrintDriver to output XML to PrintWriter
Parameters:
  `pw` - - PrintWriter to use for output

### XMLPrintDriver

    public XMLPrintDriver(java.io.OutputStream os)

  Create a new PrintDriver to output XML to OutputStream
Parameters:
  `os` - - OutputStream to use for output

Method Detail

### setEncoding

    public void setEncoding(java.lang.String enc)
                     throws java.io.IOException

  Sets the encoding of the print driver.
  Specified by:
    `setEncoding` in interface `PrintDriver`
  Parameters:
    `enc` - The encoding of the document being printed.
  Throws:
    `java.io.IOException`

### setFormatPrettyPrint

    public void setFormatPrettyPrint(boolean val)

  Sets the pretty format print
  Parameters:
    `val` - boolean value

### printDoctype

    public void printDoctype(DTD dtd)
                      throws java.io.IOException

  Prints an `DTD`.
  Specified by:
    `printDoctype` in interface `PrintDriver`
  Parameters:
    `dtd` - The dtd to be printed.
  Throws:
    `java.io.IOException`

### printDocument

    public void printDocument(XMLDocument doc)
                       throws java.io.IOException

  Prints an `XMLDocument`.
  Specified by:
    `printDocument` in interface `PrintDriver`
  Parameters:
    `doc` - The document to be printed.
  Throws:
    `java.io.IOException`

### printElement

    public void printElement(XMLElement elem)
                      throws java.io.IOException

  Prints an `XMLElement`.
  Specified by:
    `printElement` in interface `PrintDriver`
  Parameters:
    `elem` - The element to be printed.
  Throws:
    `java.io.IOException`

### printDocumentFragment

    public void printDocumentFragment(XMLDocumentFragment dfrag)
                               throws java.io.IOException

  Prints an empty `XMLDocumentFragment` object.
  Specified by:
    `printDocumentFragment` in interface `PrintDriver`
  Parameters:
    `dfrag` - The document fragment to be printed.
  Throws:
    `java.io.IOException`

### printTextNode

    public void printTextNode(XMLText text)
                       throws java.io.IOException

  Prints a `XMLText` node
  Specified by:
    `printTextNode` in interface `PrintDriver`
  Parameters:
    `text` - The text node.
  Throws:
    `java.io.IOException`

### printComment

    public void printComment(XMLComment comment)
                      throws java.io.IOException

  Prints a `XMLComment` node
  Specified by:
    `printComment` in interface `PrintDriver`
  Parameters:
    `comment` - The comment node.
  Throws:
    `java.io.IOException`

### printCDATASection

    public void printCDATASection(XMLCDATA cdata)
                           throws java.io.IOException

  Prints a `XMLCDATA` node
  Specified by:
    `printCDATASection` in interface `PrintDriver`
  Parameters:
    `cdata` - The XMLCDATA node.
  Throws:
    `java.io.IOException`

### printProcessingInstruction

    public void printProcessingInstruction(XMLPI pi)
                                    throws java.io.IOException

  Prints a `XMLPI` node
  Specified by:
    `printProcessingInstruction` in interface `PrintDriver`
  Parameters:
    `pi` - The XMLPI node.
  Throws:
    `java.io.IOException`

### printAttribute

    public void printAttribute(XMLAttr attr)
                        throws java.io.IOException

  Prints a `XMLAttr` node
  Specified by:
    `printAttribute` in interface `PrintDriver`
  Parameters:
    `attr` - The XMLAttr node.
  Throws:
    `java.io.IOException`

### printEntityReference

    public void printEntityReference(XMLEntityReference en)
                              throws java.io.IOException

  Prints a `XMLEntityReference` node
  Specified by:
    `printEntityReference` in interface `PrintDriver`
  Parameters:
    `en` - The XMLEntityReference node.
  Throws:
    `java.io.IOException`

### printChildNodes

    public final void printChildNodes(XMLNode node)
                               throws java.io.IOException

  Calls print method for each child of the `XMLNode`
  Specified by:
    `printChildNodes` in interface `PrintDriver`
  Parameters:
    `node` - The node whose children are to be printed.
  Throws:
    `java.io.IOException`

### printAttributeNodes

    public final void printAttributeNodes(XMLElement elem)
                                   throws java.io.IOException

  Calls print method for each attribute of the `XMLElement`
  Specified by:
    `printAttributeNodes` in interface `PrintDriver`
  Parameters:
    `elem` - The elem whose attributes are to be printed.
  Throws:
    `java.io.IOException`

### flush

    public void flush()
               throws java.io.IOException

  Flushes the output stream or print writer
  Specified by:
    `flush` in interface `PrintDriver`
  Throws:
    `java.io.IOException`

### close

    public void close()
               throws java.io.IOException

  Closes the output stream or print writer
  Specified by:
    `close` in interface `PrintDriver`
  Throws:
    `java.io.IOException`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Application Server XML Java API Reference 10g Release 2 (10.1.2) Part no. B12024-03 September 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003, 2004, Oracle. All rights reserved.