From: "Ing. Damiano Bolla" <[EMAIL PROTECTED]>
> Not really, reading from a socket you do not know whan the document is
finished
> You really need to use a SAXDriver to parse the data stream logically and
> detect the logical end of file.
> As far as I understand this is the only option available.

Unfortunately an XML parser can never know when the document ends. After the
last element tag there can be endless processing instructions or comments.
e.g.

<foo>
<!-- end of docuemnt -->
<?foo a="123??>

So when making XML servers you typically need to send the size first, then
the document, so you know how far to read. e.g. like a HTTP GET or POST, the
content length helps a client know how far to read on the stream.

James


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



-------------------------------------------------------
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
_______________________________________________
dom4j-dev mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-dev

Reply via email to