Package org.brownell.xml

This package contains XML utilities, including four SAX2 parsers.

See:
          Description

Class Summary
DefaultHandler This class extends the SAX base handler class to support the SAX2 Lexical and Declaration handlers.
DomBuilder Builds a DOM Level 1 (or Level 2) Document object from the output of a SAX2 parser, using a defaulted or specified DOM implementation and parser.
DomFactory Instantiates a DOMImplementation object, according to system defaults or a user-specified implementation choice.
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 process a document using a SAX parser and a specified processing pipeline.
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 SAX2 interfaces.
OracleDriver This is a wrapper around the oracle.xml.parser.v2.SAXParser SAX1 parser, implementing SAX2 interfaces.
Parser2 This is a wrapper around the com.sun.xml.parser.* SAX1 parsers, implementing SAX2 interfaces.
Resolver Utility implementation of a SAX resolver, which can be used to improve network utilization of SAX based XML (especially XHTML) components.
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 four SAX2 parsers. Note that all the SAX2 aware classes may also be used (through a ParserAdapter) with parsers that only expose SAX1 APIs, though with a certain graceful degradation of functionality.

Parsers

The parsers in this package are:

The wrappers for the Sun and Oracle parsers are the only pieces here which depend 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, but you can't modify it (sigh). For a complete Open Source solution, you can use the validating and nonvalidating versions of Ælfred in the aelfred2 sub-package.

Other Utilities

This package includes three handler utilities:

Two DOM support classes provide APIs to address two fundamental portability problems with the DOM as currently defined by W3C. The DOM Builder provides a way to connect a DOM implementation to an arbitrary SAX parser, including the ones provided in this package. You can configure both the parser and the builder. The DOM Factory addresses a slightly different problem: how to get an empty DOM document.

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