Parsing XML Documents
- SAX parser
- Event-driven
- It calls a method you provide to process each construct it encounters
- More efficient for handling large XML documents
- Gives you the information in bits and pieces
- DOM parser
- Builds a tree that represents the document
- When the parser is done, you can analyze the tree
- Easier to use for most applications
- Parse tree gives you a complete overview of the data
- DOM standard defines interfaces and methods to analyze and
modify the tree structure that represents an XML document