This document provides an overview of SAX and DOM, which are APIs for parsing XML documents. It discusses:
- SAX and DOM are standards for XML parsers that allow reading and interpreting XML files. SAX is event-based and reads XML sequentially, while DOM loads the entire XML document into memory allowing random access.
- SAX works through callbacks, where the parser calls methods supplied by the application to handle events like start elements, end elements, and character data.
- A simple SAX program is demonstrated using two classes - one contains the main method and parses the XML, while the other implements handler callbacks.
- Key differences between SAX and DOM are that DOM provides random access to