[xml] filtering a resulting NodeSet with xPath?

I need to implement in a fast way the functionality of filter a nodeset (obtained applying an xPath to an XML), hopefully aplying a new xPath.
The xPath API only applies to and xmlDocPtr, not to and xmlNodeSetPtr...
The XMLs that i need to filter has as many as 100.000 nodes, therefore performence is a must!


<elem id="0">1<elem>
<elem id="1">0<elem>
<elem id="0">0<elem>

First filter
/root/elem[ id="0"]

expected result:
<elem id="0">1<elem>
<elem id="0">0<elem>

Second filter
<elem id="0">1<elem>

This is equivalent to make an XSL that saves the first nodeset in a variable (named for example "result") and apply

Any advice?

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