Package org.brownell.xml

This package contains XML utilities, including several parsers, which implement or take advantage of SAX2 (first public alpha) APIs.

See:
          Description

Class Summary
DefaultHandler This class provides extends the SAX base handler class to support the SAX 2 Lexical and Declaration handlers.
DomBuilder Builds a DOM document from the output of a SAX 2.0 (or SAX 1.0) parser, using a defaulted or specified DOM implementation and parser.
DomParser2 This parser emits SAX2 parsing events as it traverses a DOM tree, using any conformant implementation of DOM.
DoParse This class provides a driver which may be invoked from the command line to make a SAX parser use a specified handler to process a document.
EchoHandler This class is a SAX handler which echoes all its input as a well formed XML or XHTML document.
HtmlParser This is a wrapper around the javax.swing.text.html.parser.* HTML parser, implementing the 1-June-1999 draft SAX2 interfaces.
OracleDriver This is a wrapper around the oracle.xml.parser.v2.SAXParser SAX 1.0 parser, implementing 1-June-1999 draft SAX2 interfaces.
Parser2 This is a wrapper around the com.sun.xml.parser.* SAX 1.0 parsers, implementing 1-June-1999 draft SAX2 interfaces.
XhtmlEchoHandler This extends the EchoHandler to create a class which defaults to writing XHTML text, preferring the US-ASCII encoding.
 

Package org.brownell.xml Description

This package contains XML utilities, including several parsers, which implement or take advantage of SAX2 (first public alpha) APIs. Note that all the SAX2 aware classes may also be used with parsers that only expose SAX1 APIs, though with a certain degradation of functionality.

Parsers

The parsers are:

The wrappers for the Sun and Oracle parsers are the only pieces here which are dependent on code which is not is not Open Source or Public Domain, other than core JDK code (such as SWING and Strings). At this writing, Sun's code is commercially redistributable.

Other Utilities

This package includes three handler utilities:

For developers seeking a way to connect an arbitrary DOM implementation to an arbitrary SAX parser (such as the HTML parser above), the DOM Builder may be of interest.

There is a command line utility to connect parsers to handlers and process individual documents.

Disclaimer: SAX2 is Alpha!

Note that the SAX2 APIs are not stable, and are subject to change. Accordingly, these classes are not yet stable. As of this writing, the alpha release of SAX2 is available from http://www.megginson.com/SAX/SAX2.