Java Interview questions: -Elaborate difference between SAX Parser and DOM Parser?
Following is the difference between SAX Parser and DOM Parser asked during Java interview questions.
SAX
|
DOM
|
Event based processing |
Tree based processing |
Traversing only from top to bottom that too once |
Traversing can be in any direction and any number of times |
Document content cannot be modified in SAX |
Document content can be modified in DOM |
A SAX parser serves the client application always only with pieces of the document at any given time |
A DOM parser always serves the client application with the entire document no matter how much is actually needed by the client |
More space efficient in case of a big input document |
is space inefficient when the document is huge |
See the following video on String Literal Pool asked during java Interview:-
Click for more Java interview questions
Regards,
Visit for more author’s blog on Java interview questions
http://
http://
Contributed by:
Shivprasad Koirala
We conduct training for Java/J2EE technologies like design patterns, J2EE, Struts, Hibernate, Spring, Rich Interface etc. and likes to write articles on the same in free time.
Resourse address on xpode.com
http://www.xpode.com/Print.aspx?Articleid=552
Click here to go on website
|