Re: [xml] xmlParseChunk
- From: Daniel Veillard <veillard redhat com>
- To: Dan Ellis <lists isvara net>
- Cc: xml gnome org
- Subject: Re: [xml] xmlParseChunk
- Date: Wed, 5 Sep 2001 13:07:53 -0400
On Wed, Sep 05, 2001 at 05:24:54PM +0100, Dan Ellis wrote:
On Tue, 4 Sep 2001, Daniel Veillard wrote:
the parser will get called for at least 80 bytes of input. This
will mean on each network packet (nobody's using ATM, right), it's
an ad-hoc value to represent a line of input. You're the first
suggesting lowering it so far.
The reason I ask is because it would be nice (in a situation where you
know there will be nothing after the closing root element) to have the
parsing stop in response to the end of the document. That way, when
sending XML-based requests over a network there'd be no need to include a
header just to specify the length of the document.
Of course, if you know a better way of achieving the same end, that'd be
good too.
If you're stacking multiple document onto a single stream, you have
to handle the end of the document. It's clear from the XML spec because
you can have Misc* after the end of the root. The parser cannot make that
decision, and whoever designed to put a succession of document on a single
stream must have provided a way to signal the document end. If not their
design is plain broken per the XML specification, sorry :-\
If you use libxml push mode you will have to feed him with the exact
amount of bytes from the document. You can do whatever trick to achieve
taht but it will remain a trick and not a serious design if you don't have
at the transport level a way to find where the document ends in the stream.
=> Broken design IMHO
Daniel
--
Daniel Veillard | Red Hat Network http://redhat.com/products/network/
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]