List Info

Thread: Xpath question




Xpath question
user name
2007-01-10 19:57:37
 
Hi,

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.

If no such API available, any suggestion for achieving
this?

Thanks,
Yong Chen
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xmlgnome.org
http://mai
l.gnome.org/mailman/listinfo/xml

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )