Hi,

This is a question related a bit to XPATH and a bit to how efficient Xindice is with XPATH. If this is not the right place to mail this, please let me know to who I should mail it (and apologies for the spam).


An XML document has many nodes. I want to evaluate many predicates on many nodes. For example say there is a document that looks like:
<car>
<type > bar /type>
<color> foo </color>


I want to use XPATH to select the cars of type "Mercedes" with color "black" say. Currently I do the following:
xindice xpath -c /db/CarCollection -q "/car[type='Mercedes']//ancestor::car[color='black']


It works, but is this the best way of doing this? All examples I found on the web only talk about evaluating multiple predicates on a "single" node set.

Thanks
Eno




Reply via email to