O'Reilly logo

J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software by Art Taylor

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

Event-Driven Parsing: The SAX Parser

The SAX parser provides a fast, streamlined approach to parsing XML documents. While some feel that SAX is the more complex approach to parsing documents, depending on the requirements of the application, it may in fact represent an easier and faster approach than using a DOM parser.

When the SAX parser is used, the XML document is parsed as a serial stream of content. As the content of the document is scanned, events are triggered. It is the job of the event handlers to either preserve or ignore the content being scanned by the parsers. The more common classes or interfaces used by a SAX parser application are as follows (see Table 15-4).

A complete implementation of the SAX parsing classes and interfaces ...

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