Re: [xml] Get sub-document from xmlDocPtr



On Fri, Jul 18, 2008 at 01:51:41AM -0700, Andrew Hartley wrote:


Daniel,

I am sure I had this working!  But yes xmlSubDoc == xmlDoc.

  hah !

How can I save the <CT1> nodeset as an XML document in its own right?

  well instead of saving the containing document, try to save the subtree
with 
  http://xmlsoft.org/html/libxml-xmlsave.html#xmlSaveTree

  as long as the subtree doesn't use things like namespaces defined 
higher in the document tree, the result should be the subdocument.

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/



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