[xml] XPath with SAX



Hi,

I need to handle XPath in a application to select some specific nodes
from an XML tree.

The problem is, that the files involved might be quite large (>1GB) so
DOM parsing is not an option.

Now, libxml2 handles XPath with DOM, and from what I read in the
archives of this very mailing list, XPath support requires to know the
whole tree.
Why is that ? I mean; I did read the W3 recommandation about XPath,
and I still don't get it. It should be possible to support XPath with
a SAX parser, ... I mean, .. why not ? or at least an XPath support
that only needs a schema definition...

Still, it is true that all uses I have found of XPath seemed to use
DOM which is unconceivable for too large files.

Thanks.

-- 
fz



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