Re: [xml] Access internal xmlParserInputBuffer data
- From: Nikolay Sivov <bunglehead gmail com>
- Cc: xml gnome org
- Subject: Re: [xml] Access internal xmlParserInputBuffer data
- Date: Thu, 21 Jan 2010 02:33:42 +0300
On 1/19/2010 17:46, Daniel Veillard wrote:
On Fri, Jan 15, 2010 at 10:50:15PM +0300, Nikolay Sivov wrote:
First on question background. I want to use xmlTextReader API to
access streamed xml data.
Decided to allocate input buffer with xmlAllocParserInputBuffer()
and use read callback to provide xml data
(no choice here for me actually).
Is it safe to manually set 'readcallback' and 'context' fields of
Looking at libxml2 code I don't see any problems with that, but it's
better to ask.
In general I would suggest you try to use
i.e. don't manipulate the buffer directly but let libxml2 callbacks
call you to fill data in as needed instead.
Thanks, seems to fit.
Now if you want to play with the internals, you can, libxml2 exposes
them, but I can't garantee your code won't break something, only solid
testing and careful analysis can really give insurance over such
Of course, I certainly understand.
] [Thread Prev