Package Summary  Overview Summary

class:ParserAdapter [NONE]

  • All Implemented Interfaces:
    DocumentHandler, XMLReader

    public class ParserAdapter
    extends Object
    implements XMLReader, DocumentHandler
    Adapt a SAX1 Parser as a SAX2 XMLReader.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY . See for further information.

    This class wraps a SAX1 Parser and makes it act as a SAX2 XMLReader, with feature, property, and Namespace support. Note that it is not possible to report skippedEntity events, since SAX1 does not make that information available.

    This adapter does not test for duplicate Namespace-qualified attribute names.

    1.4, SAX 2.0
    See Also:
    XMLReaderAdapter, XMLReader, Parser

constructor:<init>() [NONE]

  • ParserAdapter

    public ParserAdapter()
                  throws SAXException
    Construct a new parser adapter.

    Use the "org.xml.sax.parser" property to locate the embedded SAX1 driver.

    SAXException - If the embedded driver cannot be instantiated or if the org.xml.sax.parser property is not specified.

constructor:<init>(org.xml.sax.Parser) [NONE]

  • ParserAdapter

    public ParserAdapter​(Parser parser)
    Construct a new parser adapter.

    Note that the embedded parser cannot be changed once the adapter is created; to embed a different parser, allocate a new ParserAdapter.

    parser - The SAX1 parser to embed.
    NullPointerException - If the parser parameter is null.

method:setFeature(java.lang.String,boolean) [NONE]

method:getFeature(java.lang.String) [NONE]

method:setProperty(java.lang.String,java.lang.Object) [NONE]

method:getProperty(java.lang.String) [NONE]

method:setEntityResolver(org.xml.sax.EntityResolver) [NONE]

method:getEntityResolver() [NONE]

method:setDTDHandler(org.xml.sax.DTDHandler) [NONE]

method:getDTDHandler() [NONE]

method:setContentHandler(org.xml.sax.ContentHandler) [NONE]

method:getContentHandler() [NONE]

method:setErrorHandler(org.xml.sax.ErrorHandler) [NONE]

method:getErrorHandler() [NONE]

method:parse(java.lang.String) [NONE]

method:parse(org.xml.sax.InputSource) [NONE]

method:setDocumentLocator(org.xml.sax.Locator) [NONE]

method:startDocument() [NONE]

method:endDocument() [NONE]

method:startElement(java.lang.String,org.xml.sax.AttributeList) [NONE]

method:endElement(java.lang.String) [NONE]

method:characters(char[],int,int) [NONE]

  • characters

    public void characters​(char[] ch,
                           int start,
                           int length)
                    throws SAXException
    Adapter implementation method; do not call. Adapt a SAX1 characters event.
    Specified by:
    characters in interface DocumentHandler
    ch - An array of characters.
    start - The starting position in the array.
    length - The number of characters to use.
    SAXException - The client may raise a processing exception.
    See Also:
    DocumentHandler.characters(char[], int, int)

method:ignorableWhitespace(char[],int,int) [NONE]

method:processingInstruction(java.lang.String,java.lang.String) [NONE]

© 2019 Oracle Corporation and/or its affiliates