XMLReaderAdapter

public class XMLReaderAdapter extends 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.

See Also

Public Constructor Summary

XMLReaderAdapter()
Create a new adapter.
XMLReaderAdapter(XMLReader xmlReader)
Create a new adapter.

Public Method Summary

void
characters(char[] ch, int start, int length)
Adapt a SAX2 characters event.
void
endDocument()
End document event.
void
endElement(String uri, String localName, String qName)
Adapt a SAX2 end element event.
void
endPrefixMapping(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(InputSource input)
Parse the document.
void
parse(String systemId)
Parse the document.
void
processingInstruction(String target, String data)
Adapt a SAX2 processing instruction event.
void
setDTDHandler(DTDHandler handler)
Register the DTD event handler.
void
setDocumentHandler(DocumentHandler handler)
Register the SAX1 document event handler.
void
setDocumentLocator(Locator locator)
Set a document locator.
void
setEntityResolver(EntityResolver resolver)
Register the entity resolver.
void
setErrorHandler(ErrorHandler handler)
Register the error event handler.
void
setLocale(Locale locale)
Set the locale for error reporting.
void
skippedEntity(String name)
Adapt a SAX2 skipped entity event.
void
startDocument()
Start document event.
void
startElement(String uri, String localName, String qName, Attributes atts)
Adapt a SAX2 start element event.
void
startPrefixMapping(String prefix, String uri)
Adapt a SAX2 start prefix mapping event.

Inherited Method Summary