Re: [xml] XML streaming with libxml2



On Sun, Aug 31, 2003 at 08:28:54AM +0200, Alexander Demenshin wrote:
      So the question - is there any _reliable_ and _clean_ way (in
      libxml2 or any third-party library) to determine that complete XML
      document (with known start tag) is received?

  No ! Read the spec ....
    http://www.w3.org/TR/REC-xml#NT-document

 [1]    document    ::=    prolog element Misc*

 Misc* indicates that the parser cannot detect the end of the stream.
and finding "prolog element Misc* element" must generate a fatal error.

This information must be provided by the environment. This is a common
design error made to try to stack documents without putting markers
to signal their end. This cannot be fixed at the XML level.

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]