Re: [xml] speed between XPath & SAX & xmlReader



Hi,

On Mon, 2005-10-24 at 12:39 +0200, nico wrote:
thank you daniel

hi all,
i have to get node contents of a simple doc of 100 nodes like this
[...]
which parser is appropriate for that job?
i nee the faster one.

  XPath is not a parser !!!
  SAX2 should be the fastest, but it is the lowest level.

Daniel

Nico, IMHO I wouldn't bother using SAX2, first it might
get oversized (in terms of your code) for what you want
and second: 100 nodes of the kind in your example are
peanuts for Libxml2. So maybe you want just to consider the
xmlReader if you want less memory impact, and if memory is
not so important (and 100 nodes shouldn't, except if you run
this many times asynchronously) then just parse it into a
tree and navigate through it; I wouldn't use XPath in the
latter case, since the structure seems easy to navigate.

Regards,

Kasimier



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]