Difference Between Dom and Sax Parser in iPhone

SAX (Simple API for XML)

  1. Parses node by node
  2. Doesn't store the XML in memory
  3. We can not insert or delete a node
  4. Top to bottom traversing


Sax-parser-in-iPhone.gif


DOM (Document Object Model)

  1. Stores the entire XML document into memory before processing
  2. Occupies more memory
  3. We can insert or delete nodes
  4. Traverse in any direction

Dom-parser-in-iPhone.jpeg


Similar Articles