[xml] xmlTextReader and parseChunk
- From: Alexandre Bique <bique alexandre gmail com>
- To: xml gnome org
- Subject: [xml] xmlTextReader and parseChunk
- Date: Fri, 14 Dec 2012 11:22:37 +0100
Hi,
I would like to know if it is possible to use xmlTextReader, but with
a parseChunk interface?
Actually I do:
// I removed the checks to simplify the code
buffer = xmlAllocParserInputBuffer(XML_CHAR_ENCODING_NONE);
reader = xmlNewTextReader(buffer, url);
void data_received(const char *data, size_t len)
{
xmlParserInputBufferPush(buffer, len, data);
while (xmlTextReaderRead(reader) == 1)
parse_node(reader);
}
This works but I noticed that the last chunk may not be parsed.
How can I make the reader to consume all the remaining data?
Thanks,
--
Alexandre Bique
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]