From: Stuart Dootson (stuart.dootson_at_[hidden])
Date: 2007-07-13 14:57:08
On 13/07/07, Phil Endecott <spam_from_boost_dev_at_[hidden]> wrote:
> Stefan Seefeld wrote:
> > Phil Endecott wrote:
> >> For example, I
> >> might need to efficiently find all the <foo> nodes in a large tree.
> >> How would I do that with your library?
> > You'd do an XPath query.
> I'm pretty sure that libxml2 would visit every node in the tree to do
> that. With XSLT you can use the "key" mechanism to make this more
> efficient, but XPath alone doesn't get you that.
No, but it's *very* easy to write a bit of code to do that - I've done
so today, using Stefan's code. Also - when libxslt builds the key, it
will more than likely run an XPath query to gather the nodes that are
indexed. Remember - libxslt is built on top of libxml2's XPath
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk