Re: [xml] xmlOutputBufferGetSize and xmlOutputBufferGetContent



On Thu, Jun 06, 2013 at 02:51:19PM +1000, Callum Gibson wrote:
On 06Jun13 01:38, Breno Silva wrote:
}> I changed it to (using libxml2 2.9.0):
}>
}> memcpy(buf, xmlOutputBufferGetContent(output_buf),
}> xmlOutputBufferGetSize(output));

Should that second one also be output_buf, not output?

  that's one thing. The other is that I dont understand what
you are doing between the time you modify the tree (which sounds
correct) and the time you start accessing output_buf which I assume
is an xmlOutputBufferPtr. An xmlOutputBuffer ought to be flushed
before collecting data for example if there is an encoding conversion
taking place from UTF-8. But that's all guessing without seeing the
actual code...

Daniel

-- 
Daniel Veillard      | Open Source and Standards, Red Hat
veillard redhat com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/


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