Re: [xml] about xmlReadMemory()

2021-03-03 Thread nicolas bats via xml
thank you so much Nick, it's crystal clear now :) ++ nicolas Le mer. 3 mars 2021 à 11:12, Nick Wellnhofer a écrit : > On 03/03/2021 09:30, nicolas bats wrote: > > Hi Nick, > > I've experimented with xmlReadIO and it's cool. > > this message just to check I'm doing right: > > -I register an xmlI

Re: [xml] about xmlReadMemory()

2021-03-03 Thread Nick Wellnhofer via xml
On 03/03/2021 09:30, nicolas bats wrote: Hi Nick, I've experimented with xmlReadIO and it's cool. this message just to check I'm doing right: -I register an xmlInputReadCallback of type: size_t myCallback(void* context, char* buffer, int length) -I do my stuff in the callback and if data I use e

Re: [xml] about xmlReadMemory()

2021-03-03 Thread nicolas bats via xml
Hi Nick, I've experimented with xmlReadIO and it's cool. this message just to check I'm doing right: -I register an xmlInputReadCallback of type: size_t myCallback(void* context, char* buffer, int length) -I do my stuff in the callback and if data I use exceed the length of the buffer, I realloc it

Re: [xml] about xmlReadMemory()

2021-03-02 Thread nicolas bats via xml
Thank you Nick for your answer, I'll give a try to xmlReadIO. thanks again. ++ Le mar. 2 mars 2021 à 18:02, Nick Wellnhofer a écrit : > On 02/03/2021 16:28, nicolas bats via xml wrote: > > Hi, > > is there's a reason why xmlReadMemory > >

Re: [xml] about xmlReadMemory()

2021-03-02 Thread Nick Wellnhofer via xml
On 02/03/2021 16:28, nicolas bats via xml wrote: Hi, is there's a reason why xmlReadMemory () accepts int as the size of the array to transform to xmlDocPtr. no doubt there's one... That's simply a design mistake. The API was created

[xml] about xmlReadMemory()

2021-03-02 Thread nicolas bats via xml
Hi, is there's a reason why xmlReadMemory () accepts int as the size of the array to transform to xmlDocPtr. no doubt there's one... and in that case how could I retrieve a xmlDocPtr from memory where size is type of size_t? thank you, best