java sax parser


java sax parser

java sax parser (SAX) is an API which is use to read XML file data into java program and java sax parser will read XML data in sequential manner.

Advantage of SAX

  1. SAX is fast processing model.
  2. SAX parser is less memory intensive means it’s taking less memory to read XML file.
  3. SAX is based event processing model.
  4. SAX parser in Java is better suitable for large XML file.

Disadvantage of SAX

  1. We can not access XML data  randomly using SAX parser.
  2. We can read XML data in forward direction only using SAX Parser.
  3. SAX doesn’t preserve comments

When to use SAX over DOM

When we small size of XML file then we should go for SAX parser in java.






Full-stack web and mobile app development company Contact Us : Skype: indore.webcoder Email: info@w3sparks.com Sales: +91 8085506229