The XMLFilter Interface
Example 8.1 shows the actual code for the XMLFilter interface. In addition to the methods it inherits from the XMLReader superinterface, XMLFilter has just two new methods, getParent() and setParent(). The parent of a filter is the XMLReader to which the filter delegates most of its work. (In the context of SAX filters, the parent is not normally understood to be the superclass of the filter class.)
Example 8.1. The XMLFilter Interface
package org.xml.sax; public interface XMLFilter extends XMLReader { public void setParent(XMLReader parent); public XMLReader getParent(); } |
A class that implements this interface must provide a minimum of 16 methods: the getParent() and setParent() methods declared here and the 14 methods ...
Get Processing XML with Java™: A Guide to SAX, DOM, JDOM, JAXP, and TrAX now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.