Publisher: O'Reilly Media
Final Release Date: January 2002
Pages: 240
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, generatingyour 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 ownprogram 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 restructureinformation in layers of processing which make it easy to reuse generic tools. SAX2 also has some significant limitations that applications need to address in theirown 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.
|
-
Chapter 1 The Simple API for XML -
Types of XML APIs -
Why Choose SAX? -
Why Not to Choose SAX? -
A Short History of SAX -
Packages in the SAX2 API -
Some Popular SAX2 Parser Distributions -
Installing a SAX2 Parser -
What XML Are We Talking About? -
Chapter 2 Introducing SAX2 -
Producers and Consumers -
Beginning SAX -
Basic ContentHandler Events -
Producer-Side Validation -
Exception Handling -
Namespaces and SAX2 -
Chapter 3 Producing SAX2 Events -
Pull Mode Event Production with XMLReader -
Bootstrapping an XMLReader -
Configuring XMLReader Behavior -
The EntityResolver Interface -
Other Kinds of SAX2 Event Producers -
Chapter 4 Consuming SAX2 Events -
More About ContentHandler -
The LexicalHandler Interface -
Exposing DTD Information -
Turning SAX Events into Data Structures -
XML Pipelines -
Chapter 5 Other SAX Classes -
Helper Classes -
SAX1 Support -
Chapter 6 Putting It All Together -
Rich Site Summary: RSS -
XML and Messaging -
Including Subdocuments -
Appendix SAX2 API Summary -
The org.xml.sax Package -
The org.xml.sax.helpers Package -
The org.xml.sax.ext Package -
Appendix 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 -
Colophon |
- Title:
- SAX2
- By:
- David Brownell
- Publisher:
- O'Reilly Media
- Formats:
-
- Print
- Safari Books Online
- Print:
- January 2002
- Pages:
- 240
- Print ISBN:
- 978-0-596-00237-4
- | ISBN 10:
- 0-596-00237-8
|
-
David Brownell David Brownell is a software engineer. He's been involved with SAX since shortly after the XML 1.0 specification went final, and is currently involved in maintaining the SAX APIs and the GNUJAXP implementation. When he worked at Sun, he started the Java XML engineering effort, including SAX support, as a natural follow-on to the servlet based web software infrastructure. View David Brownell's full profile page. |
Colophon Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The animal on the cover of SAX2 is a pampas cat. Not much is known about this cat, as extensive studies on it have never been done. For instance, the pampas cat is believed to be mainly nocturnal and to live primarily on the ground. However, some pampas cats that reside in zoos have been observed as being somewhat active in daylight, as well as comfortable spending time in trees.The pampas cat is native to South America. Its natural habitat allows for quite a range, as some species are found in grasslands, some in mountain regions, and some in swampy areas. It is not a large cat, weighing only between 7 and 8 pounds when fully grown. Its features are marked by a wide face and pointed ears. The color and markings on its fur are determined by the area in which it lives. For example, in the Andes Mountains, the cat is found with gray fur and red stripes; Brazilian cats are reddishbrown with black stripes; and cats living in Argentina are a light brown shade and have faint markings. The stripes always appear on the cat's legs and torso, and the cat has very long hair, which can grow up to three inches long. When the cat is frightened, these hairs stand on end, which makes the cat seem larger, as well as more menacing. This no doubt serves as a deterrent to predators.The pampas cat population was dwindling for a time, as the cat was hunted for its skin. However, in 1980 laws were passed against this, so that particular threat to the species seems to have passed. Now the main danger is the growing human population, which is infringing on the pampas cat's home in the plains and forests. Mary Brady was the production editor and proofreader and Melanie Wang was the copyeditor for SAX2. Colleen Gorman, Matt Hutchinson, and Claire Cloutier provided quality control. Derek Di Matteo and Philip Dangler provided production support. Joe Wizda wrote the index.Ellie Volckhausen designed the cover of this book, based on a series design by Edie Freedman. The cover image is a 19th-century engraving from Mammalia. Emma Colby produced the cover layout with QuarkXPress 4.1, using Adobe's ITC Garamond font.Melanie Wang designed the interior layout based on a series design by Nancy Priest. The print version of this book was created by translating the DocBook XML markup of its source files into a set of gtroff macros, using a filter developed at O'Reilly & Associates by Norman Walsh. Steve Talbott designed and wrote the underlying macro set on the basis of the GNU troff --gs macros; Lenny Muellner adapted them to XML and implemented the book design. The GNU groff text formatter Version 1.11.1 was used to generate PostScript output. The text and heading fonts are ITC Garamond Light and Garamond Book. The illustrations that appear in the book were produced by Robert Romano and Jessamyn Read, using Macromedia FreeHand 9 and Adobe Photoshop 6. This colophon was written by Mary Brady.Whenever possible, our books use a durable and flexible lay-flat binding. |
|
Table of Contents
|
Product Details
|
About the Author
|
Colophon
|
 |
|
 |
|
|
|
Recommended for You
|
Recently Viewed
|
 |
|
By Eric A. Meyer
May 2000
By Patrick Niemeyer, Josh Peck
May 1996
By John Zukowski
April 1997
|
Customer Reviews
8/18/2002 (136 of 156 customers found this review helpful) 2/15/2002 (92 of 102 customers found this review helpful) By Gordon Anderson from Undisclosed
|
|
|