================== ===================================
When to Use SAX
SAX key points
=====================================================
SAX event model is used when you want to convert existing data to XML.
ITs an event-driven, serial-access mechanism for accessing XML documents. This protocol is frequently used by servlets and network-oriented programs that need to send and receive XML documents, because it's the fastest and least memory-intensive mechanism that is currently available for dealing with XML documents.
SAX is fast and efficient, and its event model makes it most useful for such state-independent filtering. For example, a SAX parser calls one method in your application when an element tag is encountered and calls a different method when text is found. If the processing you're doing is state-independent (meaning that it does not depend on the elements have come before), then SAX works fine.
SAX requires much less memory than DOM, because SAX does not construct an internal representation (tree structure) of the XML data, as a DOM does. Instead, SAX simply sends data to the application as it is read.
SAX API act like a serial I/O stream. You see the data as it streams in, but you can't go back to an earlier position or leap ahead to a different position. In general, SAX parsers work well when you simply want to read data and have the application act on it.
SAX was developed by the members of the XML-DEV mailing list, and the Java version is now a SourceForge project
SAX has no official standards body; it is not maintained by the World Wide Web Consortium (W3C) or any other official body
Disadvantages:
1) Setting up a program to use SAX requires a bit more work than setting up to use the Document Object Model (DOM).
2) SAX is an event-driven model and that makes it harder to visualize.
3) Finally, you can't "back up" to an earlier part of the document, or rearrange it. For those reasons, developers who are writing a user-oriented application that displays an XML document and possibly modifies it will want to use the DOM mechanism