Hey, can anyone please tell me, what are difference between “Dom parser” and “Xerces Parser”. What are the advantage and Disadvantages of either.
Hey, can anyone please tell me, what are difference between Dom parser and Xerces
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Xerces is a DOM parser. It’s the Apache implementation in Java or C++.
The two you want to think about are SAX and DOM. DOM creates an object tree in memory; SAX does not. You can manipulate the object tree after the DOM is done parsing; SAX uses an event model to process XML on the fly.
Either SAX or DOM will “work”. Your choice is usually based on whether or not you’ll keep it in memory to manipulate it or process it in place. If the XML stream is gigabytes, you might not be able to store it all at once. In that case, SAX is a good choice because you can work with it on the fly as you parse.
Google is your friend: Fire it up to learn about DOM4J and JDOM.
I’d recommend JDOM if you’re writing Java. It takes care of a lot of the boilerplate stuff.