Re: [xml] Xpath question

On Thu, Jan 11, 2007 at 07:05:36PM -0800, Yong Chen (yongche) wrote:

Thanks Daniel. I did some tests for xmlSaveTree, it basically prints out
the selected nodes and their children.

Is there any way to print out the selected nodes and their parents (till

 To me it makes very little sense to not print the children of a node,
so that would mean printing the document, which is already possible.

I can certainly do the traversal via node->parent. Just in case
you already have some API available (which will trim the non-selected
nodes from the original doc and do xmlDocDump(stdout, doc)).

  No such API, just walk the tree.


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]