Name
XMLFilterImpl
Synopsis
This class is implements an
XMLFilter that does no filtering. You can subclass
it to override whatever methods are required to perform the type of
filtering you desire.
XMLFilterImpl implements
ContentHandler, ErrorHandler,
EntityResolver, and DTDHandler
so that it can receive SAX events from the
“parent”
XMLReader object. But it also implements the
XMLFilter interface, which is an extension of
XMLReader, so that it acts as an
XMLReader itself, and can send SAX events to the
handler objects that are registered on it. Each of the handler
methods of this class simply invoke the corresponding method of the
corresponding handler that was registered on the filter. The
XMLReader methods for getting and setting features
and properties simply invoke the corresponding method of the parent
XMLReader object. The parse( )
methods do the same thing: they pass their argument to the
corresponding parse( ) method of the parent reader
to start the parsing process.
Figure 22-18. org.xml.sax.helpers.XMLFilterImpl
public class XMLFilterImpl implements org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, org.xml.sax.XMLFilter { // Public Constructors public XMLFilterImpl( ); public XMLFilterImpl(org.xml.sax.XMLReader parent); // Methods Implementing ContentHandler public void characters(char[ ] ch, int start, int length) throws ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access