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 ....

 [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 Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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