On Thu, Jun 22, 2006 at 10:31:05AM -0700, Andric, Milan wrote:
> Hi,
>
> I have xmlNodePtr pointing to a particular xmlNode in a DOM tree.
> I'm looking for a way to get full XML text representation of a XML
> subtree from that point on - i.e. XML string representing subtree for
> which currently pointed node is a root.
> I was looking at xmlSave function, but I'm not sure how would such help
> obtain XML string representation of entire subtree... an example would
> be helpful.
1/ make a buffer with xmlBufferCreate
2/ make a save context to save to that buffer with xmlSaveToBuffer
3/ as already explained use xmlSaveTree to save to the context
the result will be in the buffer in teh encoding indicated in 2/
and with the options passed there too
Daniel
--
Daniel Veillard | Red Hat http://redhat.com/
[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