[xml] End of document with push parser


I'm writing a small server which receives requests from
a TCP stream in XML and I do use a push parser for
this (xmlParseChunk).

I'm trying to find a way to detect the end of the document
I do receive.
I first searched the archive and found the following thread
but I'm not sure if I understood correctly.

I understood that I need to add something after the end of
document, such as a comment, to be used as a delimiter
(Misc *).

So, shall I use the 'instate' parameter of the parser context
and wait for it to be XML_PARSER_EPILOG in order to make
sure I reached the end?

Is there any other way for what I'm trying tp perform?

Thanks in advance.


Jérôme Marant

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