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 > root)?
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. Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ [EMAIL PROTECTED] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
