[xml] xmlOutputBufferGetSize and xmlOutputBufferGetContent



Hello guys,

I have a feature where i get an element using xmlGetProp then i change it and re-set using xmlSetProp.

Using the old libxml2 (2.7.6) i could copy the right http response body to a local buffer just accessing the output->buffer->content

memcpy(buf, output_buf->buffer->content, output_buf->buffer->use);

I changed it to (using libxml2 2.9.0):

memcpy(buf, xmlOutputBufferGetContent(output_buf), xmlOutputBufferGetSize(output));

However i'm getting partial/truncated response body. Do i need to update something ? 

Thanks

Breno



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