[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: Is DOM more efficient than SAX for smaller xml instances?
- From: "bryan rasmussen" <rasmussen.bryan@gmail.com>
- To: "Frans Englich" <frans.englich@telia.com>
- Date: Thu, 24 Aug 2006 15:59:22 +0200
Yeah, basically I figure if it is a deep hierarchy and it needs to
hold relations between parts of the hierarchy in a small to medium
sized document SAX would be most likely inefficient. But that is
different than being able to say categorically inefficient.
Cheers,
Bryan Rasmussen
On 8/24/06, Frans Englich <frans.englich@telia.com> wrote:
> 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]