Streaming API for XML - The Java EE 5 Tutorial (original) (raw)
2. Using the Tutorial Examples
3. Getting Started with Web Applications
5. JavaServer Pages Technology
7. JavaServer Pages Standard Tag Library
10. JavaServer Faces Technology
11. Using JavaServer Faces Technology in JSP Pages
12. Developing with JavaServer Faces Technology
13. Creating Custom UI Components
14. Configuring JavaServer Faces Applications
15. Internationalizing and Localizing Web Applications
16. Building Web Services with JAX-WS
17. Binding between XML Schema and Java Classes
Pull Parsing versus Push Parsing
Comparing StAX to Other JAXP APIs
Choosing between Cursor and Iterator APIs
Comparing Cursor and Iterator APIs
Resources, Namespaces, and Errors
Error Reporting and Exception Handling
Sun's Streaming XML Parser Implementation
Streaming XML Parser Factories Implementation
Returning String Representations
Building and Running the Cursor Example Using NetBeans IDE
Building and Running the Cursor Example Using Ant
Instantiating an XMLEventAllocator
Building and Running the Cursor-to-Event Example Using NetBeans IDE
Building and Running the Cursor-to-Event Example Using Ant
Building and Running the Event Example Using NetBeans IDE
Building and Running the Event Example Using Ant
Implementing the StreamFilter Class
Building and Running the Filter Example Using NetBeans IDE
Building and Running the Filter Example Using Ant
Creating an Event Producer/Consumer
Building and Running the Read-and-Write Example Using NetBeans IDE
Building and Running the Read-and-Write Example Using Ant
Building and Running the Writer Example Using NetBeans IDE
Building and Running the Writer Example Using Ant
Further Information about StAX
19. SOAP with Attachments API for Java
21. Getting Started with Enterprise Beans
23. A Message-Driven Bean Example
24. Introduction to the Java Persistence API
25. Persistence in the Web Tier
26. Persistence in the EJB Tier
27. The Java Persistence Query Language
28. Introduction to Security in the Java EE Platform
29. Securing Java EE Applications
31. The Java Message Service API
32. Java EE Examples Using the JMS API
36. The Coffee Break Application
37. The Duke's Bank Application
Chapter 18
Streaming API for XML
This chapter focuses on the Streaming API for XML (StAX), a streaming Java-based, event-driven, pull-parsing API for reading and writing XML documents. StAX enables you to create bidrectional XML parsers that are fast, relatively easy to program, and have a light memory footprint.
StAX is the latest API in the JAXP family, and provides an alternative to SAX, DOM, TrAX, and DOM for developers looking to do high-performance stream filtering, processing, and modification, particularly with low memory and limited extensibility requirements.
To summarize, StAX provides a standard, bidirectional pull parser interface for streaming XML processing, offering a simpler programming model than SAX and more efficient memory management than DOM. StAX enables developers to parse and modify XML streams as events, and to extend XML information models to allow application-specific additions. More detailed comparisons of StAX with several alternative APIs are provided below, in Comparing StAX to Other JAXP APIs.
Copyright © 2010, Oracle and/or its affiliates. All rights reserved. Legal Notices