Processing Xml With Java - A Guide To Sax, Dom, Jdom, Jaxp, And Trax Free Open Book

Processing Xml With Java - A Guide To Sax, Dom, Jdom, Jaxp, And Trax

Previous Section Next Section

What Is SAX?

SAX was invented in late 1997 to early 1998, when Peter Murray-Rust and several authors of XML parsers written in Java decided there wasn't much point in maintaining multiple similar yet incompatible APIs to do exactly the same thing. Murray-Rust was the first to suggest what he called "YAXPAPI." The reason Murray-Rust wanted Yet Another XML Parser API was that he was thoroughly sick of supporting multiple, incompatible XML parsers for his parser-client application, JUMBO. Instead, he wanted a standard API everyone could agree on. Parser authors Tim Bray and David Megginson quickly signed on to the project, and work began in public on the xml-dev mailing list, where many people participated. Megginson wrote the initial draft of SAX. After a short beta period, SAX 1.0 was released on May 11, 1998.

They designed SAX around abstract interfaces rather than concrete classes, so it could be layered on top of parsers' existing native APIs. SAX is not the most sophisticated XML API imaginable, but that's part of its beauty. The ease with which many parser vendors could implement SAX with very different architectures contributed to its success and rapid standardization.

Although SAX is very much a de facto standard, it has not undergone any formal standardization process. Its development was open to anyone interested. All you had to do was join the xml-dev mailing list and participate in the discussions. The result was explicitly placed in the public domain. It is free to be implemented or extended by anyone, for any purpose, without permission from anybody. It is not copyrighted or trademarked. As far as is known, no parts of it are patented by anyone either.

In late 1999, work began on SAX2. This was a radical reformulation of SAX that, while maintaining the same basic event-oriented architecture, replaced almost every class in SAX1. The main impetus for this radical shift was the need to make SAX namespace aware. However many other new capabilities were added in SAX2 including filters and optional support for lexical events and DTDs. SAX2 was finished in May 2000 and has proven even more successful than SAX1. Indeed SAX2 is the most complete XML API available anywhere. In 2002, all major parsers that support SAX at all support SAX2. There is no reason to learn or concern yourself with the older classes and interfaces from SAX1, and henceforth I will discuss SAX2 exclusively.

For the first few years of its life, the official SAX distribution and documentation was maintained by David Megginson. But Megginson recently passed the torch to David Brownell, who has begun work on SAX 2.1. At the time of this writing, SAX 2.1 seems unlikely to be as radical a shift relative to SAX2 as SAX2 was relative to SAX1. Version 2.1 will add a few bits of information from the XML document that SAX2 does not expose, such as the encoding declaration. However, no SAX2 classes, interfaces, or methods will be deprecated in SAX 2.1; and only programmers with very special needs will need to concern themselves with the new functionality in SAX 2.1.

    Previous Section Next Section


         Main Menu
    Main Page
    Table of content
    Copyright
    Praise for Elliotte Rusty Harold's 'Processing XML with Java™'
    List of Examples
    List of Figures
    Preface
    Part I: XML
    Part II: SAX
    Chapter 6. SAX
    What Is SAX?
    Parsing
    Callback Interfaces
    Receiving Documents
    Receiving Elements
    Handling Attributes
    Receiving Characters
    Receiving Processing Instructions
    Receiving Namespace Mappings
    'Ignorable White Space'
    Receiving Skipped Entities
    Receiving Locators
    What the ContentHandler Doesn't Tell You
    Summary
    Chapter 7. The XMLReader Interface
    Chapter 8. SAX Filters
    Part III: DOM
    Part IV: JDOM
    Part V: XPath/XSLT
    Part VI: Appendixes


    More Books
    PHP Hacks
    Processing Xml With Java - A Guide To Sax, Dom, Jdom, Jaxp, And Trax
    The Koran (Holy Qur'an)
    Macromedia Flash 8 Bible
    Search Engine Optimization for Dummies
    YouTube Traffic
    PHP 5 for Dummies
    Harry Potter and The Chamber of Secrets
    Harry Potter and the Sorcerer's Stone
    The Pilgrim's Progress
    Wireless Hacks
    Flash Hacks. 100 Industrial-Strength Tips & Tools
    PayPal Hacks. 100 Industrial-Strength Tips and Tools
    Amazon Hacks
    Pdf Hacks
    The Da Vinci Code
    Google Hacks
    The Holy Bible
    Windows XP For Dummies
    Harry Potter and the Half-Blood Prince
    Seo Book
    Upgrading and Repairing Networks
    Macromedia Dreamweaver 8 UNLEASHED
    Windows XP Annoyances
    Windows XP Hacks
    Microsoft Windows XP Power Toolkit
    Teach Yourself MS Office In 24Hours
    iPod & iTunes Missing Manual
    PC Hacks 100 Industrial-Strength Tips and Tools
    PC Overclocking, Optimization, and Tuning - 2th Edition
    PC Hardware In A Nutshell 3rd Edition
    PC Hardware in a Nutshell, 2nd Edition
    Upgrading and Repairing PCs
    Google for Dummies
    MySQL Cookbook
    Teach Yourself Macromedia Flash 8 In 24 Hours
    PHP CookBook
    Sams Teach Yourself JavaScript in 24 Hours
    PHP5 Manual
    Free Games Paper Airplanes
    500 Juegos Gratis 500 Giochi Gratis 500 Jeux Gratuits 500 Jogos Gratis 500 Kostenlose Spiele