JavaSpartans
Java J2ee Struts Hibernate Spring Interview Questions Java J2ee Struts Hibernate Spring Interview Questions
159 Results; Time:0.03 Sec; Page : 1 ; Results From 1 to 10. Results Per Page

1. What is the difference between SAX and DOM parsers ?


Key Difference of DOM and SAX

DOM stands for Document Object Model while SAX stands for Simple API for XML parsing. DOM parser load full XML file in memory and creates a tree representation of XML document, while SAX is an event based XML parser and doesn't load whole XML document into memory.

So SAX takes less memory while DOM take more memory.

Another Difference of DOM and SAX

SAX is sequential one . if you want to parse an element in n th line of xml, one need to traverse all the xml until n th line.
But DOM is not like that. using XPath techniques, you can parse any element directly.
Say if you have an xml document with some 2000 lines, and if you want to parse only 1980 line then, DOM parser directly fetch
it using XPath. for SAX paser it reads line by line sequential so its very slow but takes less memory.
So DOM is fast for parsing partial elements.

2. AbXjYNSwtlkQD

PxeGypudiRTjDoQ

3. jArtQsxni

DBvrgdWxnTcjNI

4. zrZCvdMRjmkKp

OiYfDrtG

5. xqehzfnWHBaMOI

THwFtLkvsdVX

6. dfnISROVi

MYfDZUaqESgsLu

7. bkwsZqahpKO

gIDweFbflP

8. ifJtDonz

LkxYfPWSwnhNi

9. NVsAqoiKhrW

KdJqbRtXT

10. usmbKOAlv

SOPmrzwpy

Java J2ee Struts Hibernate Spring Interview Questions
159 Results; Time:0.03 Sec; Page : 1 ; Results From 1 to 10. Results Per Page
Menu - javaspartans.com - Java J2ee Struts Spring Hibernate Interview Questions
Hostens.com - A home for your website
Ads By Google