Class XMLReaderAdapter

java.lang.Object
org.xml.sax.helpers.XMLReaderAdapter
All Implemented Interfaces:
ContentHandler, Parser

public class XMLReaderAdapter extends java.lang.Object implements Parser, ContentHandler
Adapt a SAX2 XMLReader as a SAX1 Parser.
This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.

This class wraps a SAX2 XMLReader and makes it act as a SAX1 Parser. The XMLReader must support a true value for the http://xml.org/sax/features/namespace-prefixes property or parsing will fail with a SAXException; if the XMLReader supports a false value for the http://xml.org/sax/features/namespaces property, that will also be used to improve efficiency.

Since:
SAX 2.0
Version:
2.0.1 (sax2r2)
Author:
David Megginson
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create a new adapter.
    Create a new adapter.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    characters(char[] ch, int start, int length)
    Adapt a SAX2 characters event.
    void
    End document event.
    void
    endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
    Adapt a SAX2 end element event.
    void
    endPrefixMapping(java.lang.String prefix)
    Adapt a SAX2 end prefix mapping event.
    void
    ignorableWhitespace(char[] ch, int start, int length)
    Adapt a SAX2 ignorable whitespace event.
    void
    parse(java.lang.String systemId)
    Parse the document.
    void
    Parse the document.
    void
    processingInstruction(java.lang.String target, java.lang.String data)
    Adapt a SAX2 processing instruction event.
    void
    Register the SAX1 document event handler.
    void
    Set a document locator.
    void
    Register the DTD event handler.
    void
    Register the entity resolver.
    void
    Register the error event handler.
    void
    setLocale(java.util.Locale locale)
    Set the locale for error reporting.
    void
    skippedEntity(java.lang.String name)
    Adapt a SAX2 skipped entity event.
    void
    Start document event.
    void
    startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, Attributes atts)
    Adapt a SAX2 start element event.
    void
    startPrefixMapping(java.lang.String prefix, java.lang.String uri)
    Adapt a SAX2 start prefix mapping event.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait