Forums Register Login

DOM & SAX

+Pie Number of slices to send: Send
HI there,
I prepared some list (for my use), describing Merits & demerits of DOM & SAX. If iam wrong somewhere plz correct me. If i missed anything add to that



Thanks
Shakthy.
+Pie Number of slices to send: Send
Hello,
The following points you have told is contradicting/confusing. Could you/somebody please make it bit more clear.
1. Document is huge but there is a Constraint for Memory - Which one should be used.. SAX or DOM.
2. If Speed is the constraint - Which one is best.. SAX or DOM
Other points are good and clear. Thanks for your efforts.
=Rajan=
[ December 28, 2002: Message edited by: Rajan Thiyagarajan ]
+Pie Number of slices to send: Send
Hi,
For Speed : DOM is the Best.
But If there is a memory constraint then we have to choose SAX.
Over all
Dom - speed
SAX - Limited Memory Use.
Thanks,
Shakthy,
+Pie Number of slices to send: Send
For speed, sax is the best. However, if you need to go through it more than once, dom is the best.
+Pie Number of slices to send: Send
Be careful when you talk about speed - without qualifying it can be pretty confusing.
The parsing speed for SAX is faster than DOM for significantly large docuements. I say so because for smaller documents(<1MB) the difference in speed is insignificant unless you are running an age old PC.
The parsing speed ie., time taken for the parse() call to return for DOM is slower because it has to allocate memory and creates the DOM tree with all the cross references between nodes.
The navigation speed, for lack of a better word is obviously faster in a DOM scenario because the entire document is in memory. If you were to navigate the XML document using SAX, you will have to parse it all over again!
Just my two cents worth...
+Pie Number of slices to send: Send
 

Originally posted by Roseanne Zhang:
For speed, sax is the best. However, if you need to go through it more than once, dom is the best.


because sax is not for that purposes.
Don't touch me. And dont' touch this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 654 times.
Similar Threads
SAX vs DOM when to use them
DOM or SAX confusing
What is the diff between SAX and DOM ?
DOM and SAX
DOM and SAX
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 03:26:37.