SAX Support in the IDE

SAX, the simple API for XML, is a serial access protocol for XML. SAX is an event-driven API that you can use in your Java programs by registering your document handler with a SAX parser. After registration, the parser invokes your callback methods whenever it encounters a new XML tag, an error, or other special condition.

You typically use this protocol with servlets and network-oriented programs. SAX is the fastest and least memory-intensive mechanism currently available for dealing with XML documents. If you are writing an application that displays an XML document and possibly modifies it, you might prefer to use the DOM mechanism.

Before you can generate a SAX document handler that can read your XML files, you must have a DTD defined for the files you want to handle. The IDE uses the DTD file to generate the following files:

This approach to generating SAX document handlers has the following benefits:

For a tutorial on serial access with SAX, see http://java.sun.com/xml/docs/tutorial/sax/index.html.

See also
The XML Module
Generating a DOM Tree Scanner
Generating a SAX Document Handler

Legal Notices