O'Reilly logo

Java™ Web Services Unleashed by Mark Wutka, Joseph Weber, Arthur Ryman, K. Scott Morrison, Benoît Marchal, Matthias Kloppmann, Steven Haines, Darren Govoni, Francisco Curbera, Frank Cohen, Robert Brunner

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

Simple API for XML (SAX) Parser

The main advantages of the SAX parser over the DOM include:

  • It can parse documents of any size.

  • Useful when you want to build your own data structures.

  • Useful when you want only a small subset of information contained in the XML document.

  • It is simple.

  • It is fast.

Its main disadvantages include:

  • It does not provide random access to the document; it starts at the beginning and reads through serially to the end.

  • Complex searches can be difficult to implement.

  • Lexical information is not available.

  • It is read-only.

The first thing you need to read an XML document is a SAX parser that reads the document and a document handler that makes meaningful use of the data the SAX parser reads. JAXP provides a SAX parser in its distribution ...

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