DOM Parsing - Document Object Model
- DOM defines a standard way for accessing and manipulating XML documents.
- It presents an XML document as an In Memory tree-structure.
- As the whole XML is loaded into memory(heap), it should be used only for parsing small XML files.
- Can be used to read/write XML files.
Example : java-get-node-value
SAX Parsing - Simple API for XML Parsing
- SAX is an event based XML parsing as it parses XML file step by step.
- It loads only small part of XML into memory.
- It is suitable for parsing large XML file.
- Can be used only for reading the XML files.
Links:
Java-xml-tutorials/
SAX Parsing - Simple API for XML Parsing
- SAX is an event based XML parsing as it parses XML file step by step.