Re: [xml] Pull parser termination



On Tue, Apr 09, 2002 at 09:25:14AM +0200, Fabrice DESRE - FT.BD/FTR&D/DTL/TAL wrote:
 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.

  You have to. Any solution designed to work by having the parser 
"guess" when its stream ends is fundamentally broken.

    http://www.w3.org/TR/REC-xml#NT-document
    [1]    document ::= prolog element Misc*

 Misc* clearly indicate that the framework *has to* indicate the end
of the document stream.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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