[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: Is DOM more efficient than SAX for smaller xml instances?
- From: Frans Englich <frans.englich@telia.com>
- To: xml-dev@lists.xml.org
- Date: Thu, 24 Aug 2006 14:07:51 +0000
On Thursday 24 August 2006 13:41, bryan rasmussen wrote:
> I seem to remember once, long ago, reading something showing DOM was
> more efficient than SAX for small XML instances - small being approx
> 40 kb.
It depends on what you do with it, if you ask me.
DOM does essentially what would SAX do(parse XML into events) but from there
continues to build a tree, typically. Obviously, this is less efficient than
only sending events.
So it all depends on what you do. If you take SAX events and builds a custom
structure that consumes more memory and/or is slower to navigate than a DOM
tree, it would be less efficient than using DOM..
Cheers,
Frans
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]