java.lang.Object | |
↳ | org.xml.sax.helpers.ParserAdapter |
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 http://www.saxproject.org 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.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Construct a new parser adapter.
| |||||||||||
Construct a new parser adapter.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adapter implementation method; do not call.
| |||||||||||
Adapter implementation method; do not call.
| |||||||||||
Adapter implementation method; do not call.
| |||||||||||
Return the current content handler.
| |||||||||||
Return the current DTD handler.
| |||||||||||
Return the current entity resolver.
| |||||||||||
Return the current error handler.
| |||||||||||
Check a parser feature flag.
| |||||||||||
Get a parser property.
| |||||||||||
Adapter implementation method; do not call.
| |||||||||||
Parse an XML document.
| |||||||||||
Parse an XML document.
| |||||||||||
Adapter implementation method; do not call.
| |||||||||||
Set the content handler.
| |||||||||||
Set the DTD handler.
| |||||||||||
Adapter implementation method; do not call.
| |||||||||||
Set the entity resolver.
| |||||||||||
Set the error handler.
| |||||||||||
Set a feature flag for the parser.
| |||||||||||
Set a parser property.
| |||||||||||
Adapter implementation method; do not call.
| |||||||||||
Adapter implementation method; do not call.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object
| |||||||||||
From interface org.xml.sax.DocumentHandler
| |||||||||||
From interface org.xml.sax.XMLReader
|
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. |
---|
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. |
---|
Adapter implementation method; do not call. Adapt a SAX1 characters event.
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. |
---|
Adapter implementation method; do not call. Adapt a SAX1 end document event.
SAXException | The client may raise a processing exception. |
---|
Adapter implementation method; do not call. Adapt a SAX1 end element event.
qName | The qualified (prefixed) name. |
---|
SAXException | The client may raise a processing exception. |
---|
Return the current content handler.
Return the current DTD handler.
Return the current entity resolver.
Return the current error handler.
Check a parser feature flag.
The only features recognized are namespaces and namespace-prefixes.
name | The feature name, as a complete URI. |
---|
SAXNotRecognizedException | If the feature value can't be assigned or retrieved. |
---|---|
SAXNotSupportedException | If the feature is not currently readable. |
Get a parser property.
No properties are currently recognized.
name | The property name. |
---|
SAXNotRecognizedException | If the property value can't be assigned or retrieved. |
---|---|
SAXNotSupportedException | If the property value is not currently readable. |
Adapter implementation method; do not call. Adapt a SAX1 ignorable whitespace event.
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. |
---|
Parse an XML document.
systemId | The absolute URL of the document. |
---|
IOException | If there is a problem reading the raw content of the document. |
---|---|
SAXException | If there is a problem processing the document. |
Parse an XML document.
input | An input source for the document. |
---|
IOException | If there is a problem reading the raw content of the document. |
---|---|
SAXException | If there is a problem processing the document. |
Adapter implementation method; do not call. Adapt a SAX1 processing instruction event.
target | The processing instruction target. |
---|---|
data | The remainder of the processing instruction |
SAXException | The client may raise a processing exception. |
---|
Set the content handler.
handler | the new content handler |
---|
Set the DTD handler.
handler | the new DTD handler |
---|
Adapter implementation method; do not call. Adapt a SAX1 document locator event.
locator | A document locator. |
---|
Set the entity resolver.
resolver | The new entity resolver. |
---|
Set the error handler.
handler | The new error handler. |
---|
Set a feature flag for the parser.
The only features recognized are namespaces and namespace-prefixes.
name | The feature name, as a complete URI. |
---|---|
value | The requested feature value. |
SAXNotRecognizedException | If the feature can't be assigned or retrieved. |
---|---|
SAXNotSupportedException | If the feature can't be assigned that value. |
Set a parser property.
No properties are currently recognized.
name | The property name. |
---|---|
value | The property value. |
SAXNotRecognizedException | If the property value can't be assigned or retrieved. |
---|---|
SAXNotSupportedException | If the property can't be assigned that value. |
Adapter implementation method; do not call. Adapt a SAX1 start document event.
SAXException | The client may raise a processing exception. |
---|
Adapter implementation method; do not call. Adapt a SAX1 startElement event.
If necessary, perform Namespace processing.
qName | The qualified (prefixed) name. |
---|---|
qAtts | The XML attribute list (with qnames). |
SAXException | The client may raise a processing exception. |
---|