.... Ian's: Articles collection |
Books
SAX 1.0 Interface Examples
As described in the July 2002 issue of CPU - Computer Power User magazine.
- DemoSaxApp.java -- the main program
for the SAX 1.0 example.
After viewing this document, you can
use the browser's 'save as' menu to save the program to your
computer: you will probably want to change the filename
to "DemoSaxApp.java"
- MySAXHandler.java --
The event handlers that the preceding program attaches to the
parser.
After viewing this document, you can
use the browser's 'save as' menu to save the program to your
computer: you will probably want to change the filename
to "MySAXHandler.java"
- Microstar XML Parser --
This link takes you to Open Text's Web site -- Open Text
bought Microstar a few years back, but still makes the
Microstar XML parser -- know known as Aelfred -- freely
available. A local copy is available
here. The Aelfred ZIP file contains many informative SAX 1.0
examples.
- The SAX driver interface --
This link returns a ZIP file containing the interface code
for the Java language SAX 1.0 interface. This is the interface
used by Aelfred, so you'll need this too if your Java package
does not already support SAX.
Note SAX Version 1 does not support XML name spaces --
this feature was added in SAX Version 2. SAX 2 also introduced
some other important changes to the SAX interface. The SAX 2
interface can be downloaded from
http://www.saxproject.org.
A list of differences between SAX 1.0 and SAX 2.0 is found at:
http://www.saxproject.org/?selected=sax2.
The preceding example was taken from my book, The XHTML 1.0 Web
Development Sourcebook