Re: [xml] xmlDocDumpMemory to my own buffer?
- From: Daniel Veillard <veillard redhat com>
- To: Rick Jones <rick jones2 hp com>
- Cc: xml gnome org
- Subject: Re: [xml] xmlDocDumpMemory to my own buffer?
- Date: Fri, 24 Mar 2006 16:18:17 -0500
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.
http://xmlsoft.org/html/libxml-xmlsave.html#xmlSaveToIO
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]