Well, I am making two assumptions.
1) There is only one request for each socket
2) The xml tree is a tree that is "correct" that is for each Element there
is an opening tag and a close tag.
Failing one or both of the two, then, yes, I would need to wrap the XML
within another protocol.
Damiano
Yes, you are right.
The assumption I am making is that there is one request for each socket
connection.
If we assume more than one request... well :-) this is another story.
Thanks for your reply, it is well thought.
Damiano
At 07.33 21/06/2002 -0700, Dennis Sosnoski wrote:
>Hi Damiano,
>
>The
From: "Ing. Damiano Bolla" <[EMAIL PROTECTED]>
> Maybe I did not make clear the solution I used.
>
> It IS possible to parse an XML stream coming from a socket WITHOUT knowing
> its length.
Not without making some assumptions about what the XML looks like.
> What you need to do (I can post the
Hi Damiano,
The approach you're taking is going to be a hit or miss kind of thing,
depending on the parser and the way your data is coming across the
socket connection. If you're sending multiple XML documents across the
connection there's a good chance the parser will read beyond the "end"
o
Maybe I did not make clear the solution I used.
It IS possible to parse an XML stream coming from a socket WITHOUT knowing
its length.
What you need to do (I can post the code if you wish) is understanding the
logical end of the
XML stream (the logical end is whan you go back to level Zero of t
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.
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.
At 10.18 21/06/2002 +0100, James Strachan wrote:
>T
Thanks for your mail; thats nice to know.
Another way is to read the entire document buffer into memory first then use
a StringReader or ByteArrayInputStream to parse the document.
James
- Original Message -
From: "Ing. Damiano Bolla" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Fri