org.apache.xalan.xsltc.trax

## Class DOM2SAX

- java.lang.Object
- - org.apache.xalan.xsltc.trax.DOM2SAX

- All Implemented Interfaces:
    Locator, XMLReader

      public class DOM2SAX
      extends java.lang.Object
      implements XMLReader, Locator

  Author:
    G. Todd Miller

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DOM2SAX(Node root)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getColumnNumber()` This class is only used internally so this method should never be called.
    `ContentHandler` | `getContentHandler()` Return the current content handler.
    `DTDHandler` | `getDTDHandler()` This class is only used internally so this method should never be called.
    `EntityResolver` | `getEntityResolver()` This class is only used internally so this method should never be called.
    `ErrorHandler` | `getErrorHandler()` This class is only used internally so this method should never be called.
    `boolean` | `getFeature(java.lang.String name)` This class is only used internally so this method should never be called.
    `int` | `getLineNumber()` This class is only used internally so this method should never be called.
    `java.lang.Object` | `getProperty(java.lang.String name)` This class is only used internally so this method should never be called.
    `java.lang.String` | `getPublicId()` This class is only used internally so this method should never be called.
    `java.lang.String` | `getSystemId()` This class is only used internally so this method should never be called.
    `void` | `parse()`
    `void` | `parse(InputSource unused)` Parse an XML document.
    `void` | `parse(java.lang.String sysId)` This class is only used internally so this method should never be called.
    `void` | `setContentHandler(ContentHandler handler)` Allow an application to register a content event handler.
    `void` | `setDTDHandler(DTDHandler handler)` This class is only used internally so this method should never be called.
    `void` | `setEntityResolver(EntityResolver resolver)` This class is only used internally so this method should never be called.
    `void` | `setErrorHandler(ErrorHandler handler)` This class is only used internally so this method should never be called.
    `void` | `setFeature(java.lang.String name, boolean value)` This class is only used internally so this method should never be called.
    `void` | `setProperty(java.lang.String name, java.lang.Object value)` This class is only used internally so this method should never be called.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DOM2SAX

          public DOM2SAX(Node root)

  - ### Method Detail

    - #### getContentHandler

          public ContentHandler getContentHandler()

      Description copied from interface: `XMLReader`
      Return the current content handler.
      Specified by:
        `getContentHandler` in interface `XMLReader`
      Returns:
        The current content handler, or null if none has been registered.
      See Also:
        `XMLReader.setContentHandler(org.xml.sax.ContentHandler)`

    - #### setContentHandler

          public void setContentHandler(ContentHandler handler)
                                 throws java.lang.NullPointerException

      Description copied from interface: `XMLReader`
      Allow an application to register a content event handler.

      If the application does not register a content handler, all content events reported by the SAX parser will be silently ignored.

      Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.

      Specified by:
        `setContentHandler` in interface `XMLReader`
      Parameters:
        `handler` - The content handler.
      Throws:
        `java.lang.NullPointerException`
      See Also:
        `XMLReader.getContentHandler()`

    - #### parse

          public void parse(InputSource unused)
                     throws java.io.IOException,
                            SAXException

      Description copied from interface: `XMLReader`
      Parse an XML document.

      The application can use this method to instruct the XML reader to begin parsing an XML document from any valid input source (a character stream, a byte stream, or a URI).

      Applications may not invoke this method while a parse is in progress (they should create a new XMLReader instead for each nested XML document). Once a parse is complete, an application may reuse the same XMLReader object, possibly with a different input source. Configuration of the XMLReader object (such as handler bindings and values established for feature flags and properties) is unchanged by completion of a parse, unless the definition of that aspect of the configuration explicitly specifies other behavior. (For example, feature flags or properties exposing characteristics of the document being parsed.)

      During the parse, the XMLReader will provide information about the XML document through the registered event handlers.

      This method is synchronous: it will not return until parsing has ended. If a client application wants to terminate parsing early, it should throw an exception.

      Specified by:
        `parse` in interface `XMLReader`
      Parameters:
        `unused` - The input source for the top-level of the XML document.
      Throws:
        `java.io.IOException` - An IO exception from the parser, possibly from a byte stream or character stream supplied by the application.
        `SAXException` - Any SAX exception, possibly wrapping another exception.
      See Also:
        `InputSource`, `XMLReader.parse(java.lang.String)`, `XMLReader.setEntityResolver(org.xml.sax.EntityResolver)`, `XMLReader.setDTDHandler(org.xml.sax.DTDHandler)`, `XMLReader.setContentHandler(org.xml.sax.ContentHandler)`, `XMLReader.setErrorHandler(org.xml.sax.ErrorHandler)`

    - #### parse

          public void parse()
                     throws java.io.IOException,
                            SAXException

      Throws:
        `java.io.IOException`
        `SAXException`

    - #### getDTDHandler

          public DTDHandler getDTDHandler()

      This class is only used internally so this method should never be called.
      Specified by:
        `getDTDHandler` in interface `XMLReader`
      Returns:
        The current DTD handler, or null if none has been registered.
      See Also:
        `XMLReader.setDTDHandler(org.xml.sax.DTDHandler)`

    - #### getErrorHandler

          public ErrorHandler getErrorHandler()

      This class is only used internally so this method should never be called.
      Specified by:
        `getErrorHandler` in interface `XMLReader`
      Returns:
        The current error handler, or null if none has been registered.
      See Also:
        `XMLReader.setErrorHandler(org.xml.sax.ErrorHandler)`

    - #### getFeature

          public boolean getFeature(java.lang.String name)
                             throws SAXNotRecognizedException,
                                    SAXNotSupportedException

      This class is only used internally so this method should never be called.
      Specified by:
        `getFeature` in interface `XMLReader`
      Parameters:
        `name` - The feature name, which is a fully-qualified URI.
      Returns:
        The current value of the feature (true or false).
      Throws:
        `SAXNotRecognizedException` - If the feature value can't be assigned or retrieved.
        `SAXNotSupportedException` - When the XMLReader recognizes the feature name but cannot determine its value at this time.
      See Also:
        `XMLReader.setFeature(java.lang.String, boolean)`

    - #### setFeature

          public void setFeature(java.lang.String name,
                        boolean value)
                          throws SAXNotRecognizedException,
                                 SAXNotSupportedException

      This class is only used internally so this method should never be called.
      Specified by:
        `setFeature` in interface `XMLReader`
      Parameters:
        `name` - The feature name, which is a fully-qualified URI.
        `value` - The requested value of the feature (true or false).
      Throws:
        `SAXNotRecognizedException` - If the feature value can't be assigned or retrieved.
        `SAXNotSupportedException` - When the XMLReader recognizes the feature name but cannot set the requested value.
      See Also:
        `XMLReader.getFeature(java.lang.String)`

    - #### parse

          public void parse(java.lang.String sysId)
                     throws java.io.IOException,
                            SAXException

      This class is only used internally so this method should never be called.
      Specified by:
        `parse` in interface `XMLReader`
      Parameters:
        `sysId` - The system identifier (URI).
      Throws:
        `java.io.IOException` - An IO exception from the parser, possibly from a byte stream or character stream supplied by the application.
        `SAXException` - Any SAX exception, possibly wrapping another exception.
      See Also:
        `XMLReader.parse(org.xml.sax.InputSource)`

    - #### setDTDHandler

          public void setDTDHandler(DTDHandler handler)
                             throws java.lang.NullPointerException

      This class is only used internally so this method should never be called.
      Specified by:
        `setDTDHandler` in interface `XMLReader`
      Parameters:
        `handler` - The DTD handler.
      Throws:
        `java.lang.NullPointerException`
      See Also:
        `XMLReader.getDTDHandler()`

    - #### setEntityResolver

          public void setEntityResolver(EntityResolver resolver)
                                 throws java.lang.NullPointerException

      This class is only used internally so this method should never be called.
      Specified by:
        `setEntityResolver` in interface `XMLReader`
      Parameters:
        `resolver` - The entity resolver.
      Throws:
        `java.lang.NullPointerException`
      See Also:
        `XMLReader.getEntityResolver()`

    - #### getEntityResolver

          public EntityResolver getEntityResolver()

      This class is only used internally so this method should never be called.
      Specified by:
        `getEntityResolver` in interface `XMLReader`
      Returns:
        The current entity resolver, or null if none has been registered.
      See Also:
        `XMLReader.setEntityResolver(org.xml.sax.EntityResolver)`

    - #### setErrorHandler

          public void setErrorHandler(ErrorHandler handler)
                               throws java.lang.NullPointerException

      This class is only used internally so this method should never be called.
      Specified by:
        `setErrorHandler` in interface `XMLReader`
      Parameters:
        `handler` - The error handler.
      Throws:
        `java.lang.NullPointerException`
      See Also:
        `XMLReader.getErrorHandler()`

    - #### setProperty

          public void setProperty(java.lang.String name,
                         java.lang.Object value)
                           throws SAXNotRecognizedException,
                                  SAXNotSupportedException

      This class is only used internally so this method should never be called.
      Specified by:
        `setProperty` in interface `XMLReader`
      Parameters:
        `name` - The property name, which is a fully-qualified URI.
        `value` - The requested value for the property.
      Throws:
        `SAXNotRecognizedException` - If the property value can't be assigned or retrieved.
        `SAXNotSupportedException` - When the XMLReader recognizes the property name but cannot set the requested value.

    - #### getProperty

          public java.lang.Object getProperty(java.lang.String name)
                                       throws SAXNotRecognizedException,
                                              SAXNotSupportedException

      This class is only used internally so this method should never be called.
      Specified by:
        `getProperty` in interface `XMLReader`
      Parameters:
        `name` - The property name, which is a fully-qualified URI.
      Returns:
        The current value of the property.
      Throws:
        `SAXNotRecognizedException` - If the property value can't be assigned or retrieved.
        `SAXNotSupportedException` - When the XMLReader recognizes the property name but cannot determine its value at this time.
      See Also:
        `XMLReader.setProperty(java.lang.String, java.lang.Object)`

    - #### getColumnNumber

          public int getColumnNumber()

      This class is only used internally so this method should never be called.
      Specified by:
        `getColumnNumber` in interface `Locator`
      Returns:
        The column number, or -1 if none is available.
      See Also:
        `Locator.getLineNumber()`

    - #### getLineNumber

          public int getLineNumber()

      This class is only used internally so this method should never be called.
      Specified by:
        `getLineNumber` in interface `Locator`
      Returns:
        The line number, or -1 if none is available.
      See Also:
        `Locator.getColumnNumber()`

    - #### getPublicId

          public java.lang.String getPublicId()

      This class is only used internally so this method should never be called.
      Specified by:
        `getPublicId` in interface `Locator`
      Returns:
        A string containing the public identifier, or null if none is available.
      See Also:
        `Locator.getSystemId()`

    - #### getSystemId

          public java.lang.String getSystemId()

      This class is only used internally so this method should never be called.
      Specified by:
        `getSystemId` in interface `Locator`
      Returns:
        A string containing the system identifier, or null if none is available.
      See Also:
        `Locator.getPublicId()`

Copyright © 2014 Apache XML Project. All Rights Reserved.