Book description
This concise book gives you the information you need to effectively use the Simple API for XML (SAX2), the dominant API for efficient XML processing with Java. With the SAX2 API, developers have access to the information in XML documents as they are read, without imposing major memory constraints or a large code footprint. SAX2 is often used by other APIs "under the covers", and provides a foundation for processing and creating both XML and non-XML information. While generally considered the most efficient approach to handling XML document parsing, SAX2 also carries a significant learning curve. In SAX2, author David Brownell explores the many details of managing XML parsers, filtering the information those parsers return, generating your own SAX2 events to convert non-XML information to an XML form, and developing strategies for using event-based parsing in a variety of application scenarios. Created in a public process by the XML-Dev mailing list, the SAX2 API is compact and highly functional. SAX2 uses callbacks to report the information in an XML document as the document is read, allowing you to create your own program structures around the content of documents. No intermediary model of an entire XML document is necessary, and the mapping from XML structures to Java structures and back is straightforward. Both developers learning about SAX2 for the first time and developers returning for reference and advanced material about SAX2 will find useful information in this book. Chapters provide detailed explanations and examples of many different aspects of SAX2 development, while appendices provide a reference to the API and an explanation of the relationships between the SAX2 API and the XML Information Set. While the core of the API is quite approachable, many of its more advanced features are both obscure and powerful. You can use SAX2 to filter, modify, and restructure information in layers of processing which make it easy to reuse generic tools. SAX2 also has some significant limitations that applications need to address in their own ways. This new book gives you the detail and examples required to use SAX2 to its full potential, taking advantage of its power while avoiding its limitations.
Publisher resources
Table of contents
-
SAX2
- Preface
- 1. The Simple API for XML
- 2. Introducing SAX2
- 3. Producing SAX2 Events
- 4. Consuming SAX2 Events
- 5. Other SAX Classes
- 6. Putting It All Together
-
A. SAX2 API Summary
-
The org.xml.sax Package
- The AttributeList Interface
- The Attributes Interface
- The ContentHandler Interface
- The DocumentHandler Interface
- The DTDHandler Interface
- The EntityResolver Interface
- The ErrorHandler Interface
- The HandlerBase Interface
- The InputSource Class
- The Locator Interface
- The Parser Interface
- SAXException
- SAXNotRecognizedException
- SAXNotSupportedException
- SAXParseException
- The XMLFilter Interface
- The XMLReader Interface
- The org.xml.sax.helpers Package
- The org.xml.sax.ext Package
-
The org.xml.sax Package
-
B. SAX2 and the XML Infoset
- Event Producer Issues
- Event Consumer Issues
- Document Information Item
- Element Information Items
- Attribute Information Items
- Processing Instruction Information Items
- Unexpanded Entity Reference Information Items
- Character Information Items
- Comment Information Items
- Document Type Declaration Information Item
- Unparsed Entity Information Items
- Notation Information Items
- Namespace Information Items
- Index
- Colophon
Product information
- Title: SAX2
- Author(s):
- Release date: January 2002
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596002374
You might also like
book
Designing Data-Intensive Applications
Data is at the center of many challenges in system design today. Difficult issues need to …
book
Clean Code: A Handbook of Agile Software Craftsmanship
Even bad code can function. But if code isn’t clean, it can bring a development organization …
book
Log4J
Log4j has been around for a while now, and it seems like so many applications use …
book
Spring MVC Beginner’s Guide
Unleash the power of the latest Spring MVC 4.x to develop a complete application About This …