Simple APIfor XML

Program-Transformation.Org: The Program Transformation Wiki
Homepage: http://www.saxproject.org/

The Simple API for XML (SAX) is a standard interface for event-based XML parsing. Because of the event-based approach the interface is very efficient and in special good at handling large XML documents.

SAX has quickly become a 'de facto' standard. Nowadays almost any XML based applications accepts content from a SAX ContentHandler. Alternative DOM implementations like JDOM use a SAX interface to XML parsers to create a DOM.

SAX provides attractive possibilities to create chains of components where the events flow through. Each components (also called filters) can make changes to the events or just pass them to next component. XSL transformation can be included in such a processing chain with the standard XML transformation API (TraX?) of Java.

Verifiers (also known validators) can also be used as a component of such a chain. They check whether the XML content of the events satisfies a given schema in a certain SchemaLanguageForXML.

A generic set of interface for verification called JARV is available at: http://iso-relax.sourceforge.net/JARV/

Several libraries for RelaxNG can be used as a concrete implementation of JARV. There is also an implementation for XMLSchema, which uses the Xerces2 of Apache: http://www.kohsuke.org/jarv/xerces/