Re: [xml] Dumping a node to memory

Date view Thread view Subject view Author view

From: Daniel Veillard (Daniel.Veillard@w3.org)
Date: Fri Sep 01 2000 - 11:50:06 EDT


On Fri, Sep 01, 2000 at 04:48:54PM +0200, Manuel Guesdon wrote:
>
> Hello,
>
> I haven't found function to dump a node to memory.
> There's one for dumping a doc to memory (xmlDocDumpMemory), one for dumping node or doc to file (xmlDocDump and xmlElemDump).
>
> Is there one to dump a node to memory ?

  You can retrieve a node content with

 xmlNodeGetContent()

but you won't get the attributes directly.
There is also an internal function to dump a node to an xmlBuffer but it's
not public:

  static void
  xmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level,
              int format)

maybe rolling your own based on xmlNodeDump() is the best.

Daniel

-- 
Daniel.Veillard@w3.org | W3C, INRIA Rhone-Alpes  | Today's Bookmarks :
Tel : +33 476 615 257  | 655, avenue de l'Europe | Linux XML libxml WWW
Fax : +33 476 615 207  | 38330 Montbonnot FRANCE | Gnome rpm2html rpmfind
 http://www.w3.org/People/all#veillard%40w3.org  | RPM badminton Kaffe
----
Message from the list xml@rpmfind.net
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@rpmfind.net


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Fri Sep 01 2000 - 12:43:21 EDT