JAXP StAX: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 9: Line 9:
=Overview=
=Overview=


The StAX API provide streaming, event-driven, pull parsing for reading and writing XML documents, as an alternative to [[JAXP SAX|SAX]] push parsing and [[JAXP DOM]] full in-memory tree structure representation.
The StAX API provide streaming, event-driven, pull parsing for reading and writing XML documents, as an alternative to [[JAXP SAX|SAX]] push parsing and [[JAXP DOM]] full in-memory tree structure representation. StAX has an iterator-based API, where the programmer asks for the next element (pulls the event).


StAX parsers can be used for state-dependent processing, unlike SAX parses, which can only be used for state-independent processing.
StAX parsers can be used for state-dependent processing, unlike SAX parses, which can only be used for state-independent processing.

Revision as of 00:53, 11 November 2016

External

Internal

Overview

The StAX API provide streaming, event-driven, pull parsing for reading and writing XML documents, as an alternative to SAX push parsing and JAXP DOM full in-memory tree structure representation. StAX has an iterator-based API, where the programmer asks for the next element (pulls the event).

StAX parsers can be used for state-dependent processing, unlike SAX parses, which can only be used for state-independent processing.

StAX offers a simpler programming model than SAX and more efficient memory management than JAXP DOM.

StAX Example

StAX Example

Component Packages