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.



Processing XML with Java. A Guide to SAX, DOM, JDOM, JAXP, and TrAX
Processing XML with Javaв„ў: A Guide to SAX, DOM, JDOM, JAXP, and TrAX
ISBN: 0201771861
EAN: 2147483647
Year: 2001
Pages: 191

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net