SAX stands
for the Simple API for XML. It is available along with the JAXP. It
is one of the ways of accessing the XML data. The other one is the Document
Object Model (DOM).
_______________________________________________
_______________________________________________
With
SAX the XML data is accessed sequentially and when the nodes are accessed
an event is fired. You can write code for the event fired when an XML
node is accessed. With such coding you can do custom processing of the
XML document using Java and SAX.
Working
with SAX is memory efficient, since you will not be working with the
runtime memory. With model of working with the XML document, it is possible
to work with very large XML documents and streams. For random access
of the XML nodes you can use Document Object Model.
The steps
involved in using SAX are to first create a SAX parser and then a SAX
event handler. Then you can use the SAX even handler to parse the XML
document. You can find lots of sample codes using SAX at
http://developers.sun.com/sw/building/codesamples/sax/