x

XML – SAX

PREV     NEXT

XML SAX:


  1. SAX parsers process the XML documents sequentially
  2. Each element is parsed down to its leaf node before moving on to the next sibling of that element, therefore at no point is there any clear relation of what level of the tree we are at.
  3. When is SAX used:
    1. For handling large documents
    2. Retrieving a specific value
    3. Creating a subset of the document
  4. When is DOM used:
    1. Modifying the document (as SAX is read-only)
    2. Random access
  5. Handler interfaces:
    1. Org.xml.sax.ContentHandler
    2. Org.xml.sax.ErrorHandler
    3. Org.xml.sax.DTDHandler
    4. Org.xml.sax.EntityResolver

PREV     NEXT



Like it? Please Spread the word!

Post Your Thoughts