[xml] xmlDocDumpMemory to my own buffer?

Is there a call akin to  xmlDocDumpMemory where I can supply the buffer?

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.

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.

I do _not_ want to make two separate send calls - when the data is logically associated as it is here it is an application bug to do so (IMO) and only invites trouble with performance.

rick jones

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