Re: [xml] reading data chunk by chunk



Mircea Gliga <mgliga integrasoft ro> writes:

Hello

I am trying to parse data read from the network, so I progressively
feed the data into a reader. I'm using a xmlReaderForMemory, when I
receive the data I feed it using this function: xmlReaderNewMemory.
For pulling the data out I use xmlTextReaderRead.
Is this the correct way to do such a thing ?

No, that would make each piece of data be treated as a separate
document. You should use xmlReaderForIO() and pass an ioread function
that gets the data from the network.

http://xmlsoft.org/html/libxml-xmlreader.html#xmlReaderForIO




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