Re: [xml] xmlDocDumpMemory to my own buffer?

On Fri, Mar 24, 2006 at 12:53:04PM -0800, Rick Jones wrote:
Is there a call akin to  xmlDocDumpMemory where I can supply the buffer?

  No, for the simple reason that we can't guess in advance how much
memory a document may take.

In netperf4, I presently use xmlDocDumpMemory and then send that buffer, 
prefixed with a four byte length field out a socket via sendmsg().  as 
part of porting to windows I am porting to glib and its IO channels, 
which do not appear to have a "gathering" write a la sendmsg() and I 
would like to avoid copying the dumped XML.

  Build your own I/O handlers and use a custom I/O dump.

So, I'd like to be able to provide the buffer into which the doc is 
dumped, so I can have libxml put the stuff after where the header would 
go and then I just ahve the one buffer.

  build you own I/O handler saving to that specific block.


Daniel Veillard      | Red Hat
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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