First page Back Continue Last page Overview Graphics

Ways of processing XML


Notes:

DOM
builds a “tree” representation of your XML
benefits: less concerned with output format (SAX always has an eye on output for speed reasons)
drawbacks: can be slow, needs to read in entire doc before processing. Large memory overhead.

SAX
processes XML as it comes in based on “event handlers”, ie “I've just got this tag!” and appropriate handlers respond with “I know what to do with that!”
benefits: fast, low memory footprint
drawbacks: inefficient if you need to do lots of non-sequential processing of document