Analyst Integration Question:
Download Job Interview Questions and Answers PDF
What is difference between DOM and SAX parser?
Answer:
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.
Download Integration Programmer Interview Questions And Answers
PDF
Previous Question | Next Question |
What is heap and stack in a process? | What is a critical section? |