O'Reilly logo

Enterprise Application Integration With XML and Java™ by Bill la Forge, JP Morgenthal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

10.3. SAX Filters

Applications that use a SAX parser must process the events that the parser produces. Often this task is simplified by using a filter to preprocess these events. A filter sits between the SAX parser and an application, processing the events from the parser before passing them on to the application (see Figure 10-1). Therefore, a filter must implement the SAX Parser interface and interact with the application as if it were the parser. A filter must also implement various event handler interfaces, including org.xml.sax.DocumentHandler, and interact with the parser as if it were the application. Inserting a filter between a SAX parser and an application can often be done with very few changes to the application.

Figure 10-1. An ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required