java.lang.Object | |
↳ | org.xml.sax.helpers.XMLFilterImpl |
Base class for deriving an XML filter.
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 is designed to sit between an XMLReader
and the client application's event handlers. By default, it
does nothing but pass requests up to the reader and events
on to the handlers unmodified, but subclasses can override
specific methods to modify the event stream or the configuration
requests as they pass through.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Construct an empty XML filter, with no parent.
| |||||||||||
Construct an XML filter with the specified parent.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Filter a character data event.
| |||||||||||
Filter an end document event.
| |||||||||||
Filter an end element event.
| |||||||||||
Filter an end Namespace prefix mapping event.
| |||||||||||
Filter an error event.
| |||||||||||
Filter a fatal error event.
| |||||||||||
Get the content event handler.
| |||||||||||
Get the current DTD event handler.
| |||||||||||
Get the current entity resolver.
| |||||||||||
Get the current error event handler.
| |||||||||||
Look up the value of a feature.
| |||||||||||
Get the parent reader.
| |||||||||||
Look up the value of a property.
| |||||||||||
Filter an ignorable whitespace event.
| |||||||||||
Filter a notation declaration event.
| |||||||||||
Parse a document.
| |||||||||||
Parse a document.
| |||||||||||
Filter a processing instruction event.
| |||||||||||
Filter an external entity resolution.
| |||||||||||
Set the content event handler.
| |||||||||||
Set the DTD event handler.
| |||||||||||
Filter a new document locator event.
| |||||||||||
Set the entity resolver.
| |||||||||||
Set the error event handler.
| |||||||||||
Set the value of a feature.
| |||||||||||
Set the parent reader.
| |||||||||||
Set the value of a property.
| |||||||||||
Filter a skipped entity event.
| |||||||||||
Filter a start document event.
| |||||||||||
Filter a start element event.
| |||||||||||
Filter a start Namespace prefix mapping event.
| |||||||||||
Filter an unparsed entity declaration event.
| |||||||||||
Filter a warning event.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.xml.sax.ContentHandler
| |||||||||||
From interface
org.xml.sax.DTDHandler
| |||||||||||
From interface
org.xml.sax.EntityResolver
| |||||||||||
From interface
org.xml.sax.ErrorHandler
| |||||||||||
From interface
org.xml.sax.XMLFilter
| |||||||||||
From interface
org.xml.sax.XMLReader
|
Construct an empty XML filter, with no parent.
This filter will have no parent: you must assign a parent
before you start a parse or do any configuration with
setFeature or setProperty, unless you use this as a pure event
consumer rather than as an XMLReader
.
Construct an XML filter with the specified parent.
parent | the XML reader from which this filter receives its events. |
---|
Filter a character data event.
ch | An array of characters. |
---|---|
start | The starting position in the array. |
length | The number of characters to use from the array. |
SAXException | The client may throw an exception during processing. |
---|
Filter an end document event.
SAXException | The client may throw an exception during processing. |
---|
Filter an end element event.
uri | The element's Namespace URI, or the empty string. |
---|---|
localName | The element's local name, or the empty string. |
qName | The element's qualified (prefixed) name, or the empty string. |
SAXException | The client may throw an exception during processing. |
---|
Filter an end Namespace prefix mapping event.
prefix | The Namespace prefix. |
---|
SAXException | The client may throw an exception during processing. |
---|
Filter an error event.
e | The error as an exception. |
---|
SAXException | The client may throw an exception during processing. |
---|
Filter a fatal error event.
e | The error as an exception. |
---|
SAXException | The client may throw an exception during processing. |
---|
Get the content event handler.
Get the current DTD event handler.
Get the current entity resolver.
Get the current error event handler.
Look up the value of a feature.
This will always fail if the parent is null.
name | The feature name. |
---|
SAXNotRecognizedException | If the feature value can't be assigned or retrieved from the parent. |
---|---|
SAXNotSupportedException | When the parent recognizes the feature name but cannot determine its value at this time. |
Get the parent reader.
Look up the value of a property.
name | The property name. |
---|
SAXNotRecognizedException | If the property value can't be assigned or retrieved from the parent. |
---|---|
SAXNotSupportedException | When the parent recognizes the property name but cannot determine its value at this time. |
Filter an ignorable whitespace event.
ch | An array of characters. |
---|---|
start | The starting position in the array. |
length | The number of characters to use from the array. |
SAXException | The client may throw an exception during processing. |
---|
Filter a notation declaration event.
name | The notation name. |
---|---|
publicId | The notation's public identifier, or null. |
systemId | The notation's system identifier, or null. |
SAXException | The client may throw an exception during processing. |
---|
Parse a document.
input | The input source for the document entity. |
---|
SAXException | Any SAX exception, possibly wrapping another exception. |
---|---|
IOException | An IO exception from the parser, possibly from a byte stream or character stream supplied by the application. |
Parse a document.
systemId | The system identifier as a fully-qualified URI. |
---|
SAXException | Any SAX exception, possibly wrapping another exception. |
---|---|
IOException | An IO exception from the parser, possibly from a byte stream or character stream supplied by the application. |
Filter a processing instruction event.
target | The processing instruction target. |
---|---|
data | The text following the target. |
SAXException | The client may throw an exception during processing. |
---|
Filter an external entity resolution.
publicId | The entity's public identifier, or null. |
---|---|
systemId | The entity's system identifier. |
SAXException | The client may throw an exception during processing. |
---|---|
IOException | The client may throw an I/O-related exception while obtaining the new InputSource. |
Set the content event handler.
handler | the new content handler |
---|
Set the DTD event handler.
handler | the new DTD handler |
---|
Filter a new document locator event.
locator | The document locator. |
---|
Set the entity resolver.
resolver | The new entity resolver. |
---|
Set the error event handler.
handler | the new error handler |
---|
Set the value of a feature.
This will always fail if the parent is null.
name | The feature name. |
---|---|
value | The requested feature value. |
SAXNotRecognizedException | If the feature value can't be assigned or retrieved from the parent. |
---|---|
SAXNotSupportedException | When the parent recognizes the feature name but cannot set the requested value. |
Set the parent reader.
This is the XMLReader
from which
this filter will obtain its events and to which it will pass its
configuration requests. The parent may itself be another filter.
If there is no parent reader set, any attempt to parse or to set or get a feature or property will fail.
parent | The parent XML reader. |
---|
Set the value of a property.
This will always fail if the parent is null.
name | The property name. |
---|---|
value | The requested property value. |
SAXNotRecognizedException | If the property value can't be assigned or retrieved from the parent. |
---|---|
SAXNotSupportedException | When the parent recognizes the property name but cannot set the requested value. |
Filter a skipped entity event.
name | The name of the skipped entity. |
---|
SAXException | The client may throw an exception during processing. |
---|
Filter a start document event.
SAXException | The client may throw an exception during processing. |
---|
Filter a start element event.
uri | The element's Namespace URI, or the empty string. |
---|---|
localName | The element's local name, or the empty string. |
qName | The element's qualified (prefixed) name, or the empty string. |
atts | The element's attributes. |
SAXException | The client may throw an exception during processing. |
---|
Filter a start Namespace prefix mapping event.
prefix | The Namespace prefix. |
---|---|
uri | The Namespace URI. |
SAXException | The client may throw an exception during processing. |
---|
Filter an unparsed entity declaration event.
name | The entity name. |
---|---|
publicId | The entity's public identifier, or null. |
systemId | The entity's system identifier, or null. |
notationName | The name of the associated notation. |
SAXException | The client may throw an exception during processing. |
---|
Filter a warning event.
e | The warning as an exception. |
---|
SAXException | The client may throw an exception during processing. |
---|