Re: [xml] Xpath question

On Wed, Jan 10, 2007 at 05:57:37PM -0800, Yong Chen (yongche) wrote:

I plan to use xpath in libxml2 to get a subset of a xmldoc, I know it
can be done by calling xmlXPathEvalExpression(), the result is a
xmlXPathObjectPtr which has a "nodesetval" member pointing to selected
nodes (of type xmlNodeSetPtr).

My question is, after getting the selected nodes, is there any API I can
call to dump the selected nodes in xml tree format? There is a
convenient API xmlDocDump(stdout, doc) to dump the whole doc in xml tree
format, I'm looking for something like xmlDocDumpSubset(doc,
selected-nodes) to dump only the selected nodes in the doc.



Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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