[xml] Pull parser termination



 Hello,

 I'm using the push parser to read a stream XML document. My problem is
to know when I can safely use xmlParseChunk(..., 1) (ie end up parsing),
since I have no way on the reading side to know if i'm at
the end of the document.
 Two solutions come to my mind, but none of them is really appealing :
1) Track the internal field nodeNr in the parser context. My
understanding is that it should be zero at the end of the document.
2) Use my own SAX Handler just to catch the endDocument event.

 Any hints ?
 
 Thanks,

        Fabrice
-- 
Fabrice Desré - France Telecom R&D/DTL/TAL
Tel: +(33) 2 96 05 31 43
Fax: +(33) 2 96 05 39 45



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