[xml] best way copy of xmlXPathObjectPtr->node


I wanted to do a function you give a xmlDocPtr and an XPath expression,
that returns a xmlNodeSetPtr, so you don't have to create any
xmlXPathContextPtr. The problem is, that nodesetval is being free'd,
when I call xmlXPathFreeObject() and I haven't found a function in
libxml2 to copy a xmlNodeSetPtr. Is there a better way to get a copy
beside loop through all the nodes and put them in a new xmlNodeSetPtr


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