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.
org.xml.sax.XMLFilter , org.xml.sax.XMLReader , org.xml.sax.EntityResolver , org.xml.sax.DTDHandler , org.xml.sax.ContentHandler , org.xml.sax.ErrorHandler
| Modifier and Type | Field and Description |
|---|---|
| private ContentHandler | |
| private DTDHandler | |
| private EntityResolver | |
| private ErrorHandler | |
| private Locator | |
| private XMLReader |
| Access | Constructor and Description |
|---|---|
| public | |
| public | XMLFilterImpl(XMLReader
the specified parent parent)Construct an XML filter with the specified parent. |
| Modifier and Type | Method and Description |
|---|---|
| public void | characters(char[]
An array of characters. ch, int The starting position in the array. start, int The number of characters to use from the array. length)Implements org. Filter a character data event. |
| public void | |
| public void | endElement(String
The element's Namespace URI, or the empty string. uri, String The element's local name, or the empty string. localName, String The element's qualified (prefixed) name, or the empty
string. qName)Implements org. Filter an end element event. |
| public void | endPrefixMapping(String
The Namespace prefix. prefix)Implements org. Filter an end Namespace prefix mapping event. |
| public void | error(SAXParseException
The error as an exception. e)Implements org. Filter an error event. |
| public void | fatalError(SAXParseException
The error as an exception. e)Implements org. Filter a fatal error event. |
| public ContentHandler | Returns: The current content handler, or null if none was set.Implements org. Get the content event handler. |
| public DTDHandler | Returns: The current DTD handler, or null if none was set.Implements org. Get the current DTD event handler. |
| public EntityResolver | Returns: The current entity resolver, or null if none was set.Implements org. Get the current entity resolver. |
| public ErrorHandler | Returns: The current error handler, or null if none was set.Implements org. Get the current error event handler. |
| public boolean | Returns: The current value of the feature.The feature name. name)Implements org. Look up the value of a feature. |
| public XMLReader | Returns: The parent XML reader, or null if none is set.Implements org. Get the parent reader. |
| public Object | Returns: The current value of the property.The property name. name)Implements org. Look up the value of a property. |
| public void | ignorableWhitespace(char[]
An array of characters. ch, int The starting position in the array. start, int The number of characters to use from the array. length)Implements org. Filter an ignorable whitespace event. |
| public void | notationDecl(String
The notation name. name, String The notation's public identifier, or null. publicId, String The notation's system identifier, or null. systemId)Implements org. Filter a notation declaration event. |
| public void | parse(InputSource
The input source for the document entity. input)Implements org. Parse a document. |
| public void | parse(String
The system identifier as a fully-qualified URI. systemId)Implements org. Parse a document. |
| public void | processingInstruction(String
The processing instruction target. target, String The text following the target. data)Implements org. Filter a processing instruction event. |
| public InputSource | Returns: A new InputSource or null for the default.The entity's public identifier, or null. publicId, String The entity's system identifier. systemId)Implements org. Filter an external entity resolution. |
| public void | setContentHandler(ContentHandler
the new content handler handler)Implements org. Set the content event handler. |
| public void | setDocumentLocator(Locator
The document locator. locator)Implements org. Filter a new document locator event. |
| public void | setDTDHandler(DTDHandler
the new DTD handler handler)Implements org. Set the DTD event handler. |
| public void | setEntityResolver(EntityResolver
The new entity resolver. resolver)Implements org. Set the entity resolver. |
| public void | setErrorHandler(ErrorHandler
the new error handler handler)Implements org. Set the error event handler. |
| public void | setFeature(String
The feature name. name, boolean The requested feature value. value)Implements org. Set the value of a feature. |
| public void | setParent(XMLReader
The parent XML reader. parent)Implements org. Set the parent reader. |
| public void | setProperty(String
The property name. name, Object The requested property value. value)Implements org. Set the value of a property. |
| private void | |
| public void | skippedEntity(String
The name of the skipped entity. name)Implements org. Filter a skipped entity event. |
| public void | |
| public void | startElement(String
The element's Namespace URI, or the empty string. uri, String The element's local name, or the empty string. localName, String The element's qualified (prefixed) name, or the empty
string. qName, Attributes The element's attributes. atts)Implements org. Filter a start element event. |
| public void | startPrefixMapping(String
The Namespace prefix. prefix, String The Namespace URI. uri)Implements org. Filter a start Namespace prefix mapping event. |
| public void | unparsedEntityDecl(String
The entity name. name, String The entity's public identifier, or null. publicId, String The entity's system identifier, or null. systemId, String The name of the associated notation. notationName)Implements org. Filter an unparsed entity declaration event. |
| public void | warning(SAXParseException
The warning as an exception. e)Implements org. Filter a warning event. |
| contentHandler | back to summary |
|---|---|
| private ContentHandler contentHandler | |
| dtdHandler | back to summary |
|---|---|
| private DTDHandler dtdHandler | |
| entityResolver | back to summary |
|---|---|
| private EntityResolver entityResolver | |
| errorHandler | back to summary |
|---|---|
| private ErrorHandler errorHandler | |
| locator | back to summary |
|---|---|
| private Locator locator | |
| parent | back to summary |
|---|---|
| private XMLReader parent | |
| XMLFilterImpl | back to summary |
|---|---|
| public XMLFilterImpl() 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 | |
| XMLFilterImpl | back to summary |
|---|---|
| public XMLFilterImpl(XMLReader parent) Construct an XML filter with the specified parent. | |
| characters | back to summary |
|---|---|
| public void characters(char[] ch, int start, int length) throws SAXException Implements org. Filter a character data event.
| |
| endDocument | back to summary |
|---|---|
| public void endDocument() throws SAXException Implements org. Filter an end document event.
| |
| endElement | back to summary |
|---|---|
| public void endElement(String uri, String localName, String qName) throws SAXException Implements org. Filter an end element event.
| |
| endPrefixMapping | back to summary |
|---|---|
| public void endPrefixMapping(String prefix) throws SAXException Implements org. Filter an end Namespace prefix mapping event.
| |
| error | back to summary |
|---|---|
| public void error(SAXParseException e) throws SAXException Implements org. Filter an error event.
| |
| fatalError | back to summary |
|---|---|
| public void fatalError(SAXParseException e) throws SAXException Implements org. Filter a fatal error event.
| |
| getContentHandler | back to summary |
|---|---|
| public ContentHandler getContentHandler() Implements org. Get the content event handler.
| |
| getDTDHandler | back to summary |
|---|---|
| public DTDHandler getDTDHandler() Implements org. Get the current DTD event handler.
| |
| getEntityResolver | back to summary |
|---|---|
| public EntityResolver getEntityResolver() Implements org. Get the current entity resolver.
| |
| getErrorHandler | back to summary |
|---|---|
| public ErrorHandler getErrorHandler() Implements org. Get the current error event handler.
| |
| getFeature | back to summary |
|---|---|
| public boolean getFeature(String name) throws SAXNotRecognizedException, SAXNotSupportedException Implements org. Look up the value of a feature. This will always fail if the parent is null.
| |
| getParent | back to summary |
|---|---|
| public XMLReader getParent() Implements org. Get the parent reader. | |
| getProperty | back to summary |
|---|---|
| public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException Implements org. Look up the value of a property.
| |
| ignorableWhitespace | back to summary |
|---|---|
| public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException Implements org. Filter an ignorable whitespace event.
| |
| notationDecl | back to summary |
|---|---|
| public void notationDecl(String name, String publicId, String systemId) throws SAXException Implements org. Filter a notation declaration event.
| |
| parse | back to summary |
|---|---|
| public void parse(InputSource input) throws SAXException, IOException Implements org. Parse a document.
| |
| parse | back to summary |
|---|---|
| public void parse(String systemId) throws SAXException, IOException Implements org. Parse a document.
| |
| processingInstruction | back to summary |
|---|---|
| public void processingInstruction(String target, String data) throws SAXException Implements org. Filter a processing instruction event.
| |
| resolveEntity | back to summary |
|---|---|
| public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException Implements org. Filter an external entity resolution.
| |
| setContentHandler | back to summary |
|---|---|
| public void setContentHandler(ContentHandler handler) Implements org. Set the content event handler.
| |
| setDocumentLocator | back to summary |
|---|---|
| public void setDocumentLocator(Locator locator) Implements org. Filter a new document locator event.
| |
| setDTDHandler | back to summary |
|---|---|
| public void setDTDHandler(DTDHandler handler) Implements org. Set the DTD event handler.
| |
| setEntityResolver | back to summary |
|---|---|
| public void setEntityResolver(EntityResolver resolver) Implements org. Set the entity resolver.
| |
| setErrorHandler | back to summary |
|---|---|
| public void setErrorHandler(ErrorHandler handler) Implements org. Set the error event handler.
| |
| setFeature | back to summary |
|---|---|
| public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException Implements org. Set the value of a feature. This will always fail if the parent is null.
| |
| setParent | back to summary |
|---|---|
| public void setParent(XMLReader parent) Implements org. Set the parent reader. This is the If there is no parent reader set, any attempt to parse or to set or get a feature or property will fail. | |
| setProperty | back to summary |
|---|---|
| public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException Implements org. Set the value of a property. This will always fail if the parent is null.
| |
| setupParse | back to summary |
|---|---|
| private void setupParse() Set up before a parse. Before every parse, check whether the parent is non-null, and re-register the filter for all of the events. | |
| skippedEntity | back to summary |
|---|---|
| public void skippedEntity(String name) throws SAXException Implements org. Filter a skipped entity event.
| |
| startDocument | back to summary |
|---|---|
| public void startDocument() throws SAXException Implements org. Filter a start document event.
| |
| startElement | back to summary |
|---|---|
| public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException Implements org. Filter a start element event.
| |
| startPrefixMapping | back to summary |
|---|---|
| public void startPrefixMapping(String prefix, String uri) throws SAXException Implements org. Filter a start Namespace prefix mapping event.
| |
| unparsedEntityDecl | back to summary |
|---|---|
| public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException Implements org. Filter an unparsed entity declaration event.
| |
| warning | back to summary |
|---|---|
| public void warning(SAXParseException e) throws SAXException Implements org. Filter a warning event.
| |