Java APIs for XML Kick Start By Aoyon Chowdhury, Parag Choudhary
Table of Contents
Chapter 13. Looking Ahead: JAXB and Beyond
The Streaming API for XML (StAX) JSR defines a parsing mechanism for XML documents that's based on Java standards. It is different from the other two parsing standards, SAX and DOM, in the sense that this API provides the parsing control to the programmer through the use of iterator-based APIs. Having an iterator-based API enables an application to pull the next event as required and then store its state in a data container, such as an array or vector.
This API arose from the need for a streaming API for the JAXB and JAX-RPC specifications. Both of these specifications process an XML documents as a stream of events, where the current context of the event determines the next step that the XML processor has to take.