XML Processing Models
-
Stream Mode (SAX)
- during parsing, call methods for each parsing event (open tag, text, close tag)
- low memory usage, complex to use
-
Tree Mode (DOM)
- load the XML in memory, as a tree of objects
- select nodes using navigation or queries (Xpath)
- transform using delete, move, insert methods
- needs more memory, easier to use