[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [xml] extracting xml subtree text (string) for entire subtree of XML node
- From: Daniel Veillard <veillard redhat com>
- To: "Andric, Milan" <milan andric intel com>
- Cc: xml gnome org
- Subject: Re: [xml] extracting xml subtree text (string) for entire subtree of XML node
- Date: Thu, 22 Jun 2006 17:18:42 -0400
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/
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]