Re: [xml] Parsing by chunk but unknown terminate

On Sun, Feb 10, 2008 at 01:27:24PM +0100, qk wrote:
I need parsing chunk of memories. But I don't know which chunk is 
terminate (so it can be first or nineth). Is any posibility to after 
each chunk try if it is validate and if so then make dom tree?

  Basically no.

    [1]         document           ::=           prolog  element  Misc*

see that terminating Misc* ? That mean the parser can't guess if there is
more content pertaining to this document even after the root element has
been closed.
If you are put in a situation where the XML input layer can't tell you
when the document is terminated, then that means that input layer has
been designed by people you didn't try to read the first page of the
XML specification. It's not suitable for XML transport, either by design
or by negligence, too bad... Try to put markers in the flow to indicate
where the document ends and detect it at the lower level.


Red Hat Virtualization group
Daniel Veillard      | virtualization library
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]