Answers

Question and Answer:

  Home  Integration Programmer

⟩ Can you please explain the difference between DOM and SAX parser?

DOM parser is a in memory parser so it loads whole XML file in memory and create a DOM tree to parse. SAX parser is a event based parser, so it parses XML document based upon event received e.g. opening tag, closing tag, start of attribute or end of attribute. Because of their working methodology, DOM parser is not suitable for large XML file as they will take lot of space in memory and your process may ran out of memory, SAX is the one which should be used to parse large files. For small files, DOM is usually much faster than SAX.

 186 views

More Questions for you: