Copyright 2004-2005 Ian E. Gorman
GXPARSE release $Name: gxparse-sf-alpha-2_0 $
This User Guide is a skeleton that will be expanded to a full user guide. The HTML version has been produced by the docbook-to-HTML translator that is included with GXPARSE.

Summary Table of Contents

1 Introduction to Parsing with GXPARSE
2 Element Mappers
3 Pattern Matching
A-1 Installing the Software


Java developers use two kinds of parsers, DOM parsers that produce a memory-based tree containing the full document, and SAX parsers that report a series of "events" as the document is scanned, but without retaining any information. DOM parsers are easier to work with because they present the data in a way that more closely matches a designer's view of XML, and because they are supported by powerful tools like XSLT. On the other hand, SAX parsers can handle documents of unlimited size.

The Generic XML Stream Parser API makes extensive use of ideas behind the SAX API. In creating SAX, David Megginson defined an XML stream parsing paradigm. The Generic XML Stream Parser API expands and simplifies the paradigm without losing the advantages of the orginal paradigm.

The XML stream parser API can be implemented over a SAX parser without greatly reducing the benefits provided by a SAX parser, and can implemented over other XML stream parsers. The new API brings some of the advantages of the DOM parser, by presenting a data in a way that more closely follows a designer's view of an XML document, and by adding some supporting tools to make design easier.

The XML stream parser API includes an example implementation on the SAX parser. Also included, as an example application, is the translator that produced the HTML version of this document from the docbook XML source.