Re: [xml] xmlOutputBufferGetSize and xmlOutputBufferGetContent

Hello guys thank you for your attention. Let me share with you the code:

Daniel, i think that would be the problem... there is something i'm missing or doing wrong between the time i change the tree and start accessing the output buffer.

In this code int the line 708 i'm changing the tree using xmlSetProp(), then starting on line 1076 i would like to get the new tree and copy it to my own variable.

Let me know if you have any more questions.



On Thu, Jun 6, 2013 at 5:24 AM, Daniel Veillard <veillard redhat com> wrote:
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 Veillard      | Open Source and Standards, Red Hat
veillard redhat com  | libxml Gnome XML XSLT toolkit | virtualization library
xml mailing list, project page
xml gnome org

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