[Mono-list] parsing an incomplete xml

Krisztian PIFKO monsta@mail.tvnet.hu
Mon, 19 Jul 2004 10:46:31 +0200


On Sun, 2004-07-18 at 20:34 -0700, Scott Boston wrote:
> How are you feeding the incomplete xml into the XmlTextReader? 

i have a StringBuilder buffering the input, and i try to create
the XmlTextReader using a StringReader created from StringBuilder's
ToString().

> You can create a NetworkStream from your Socket and use that to create
> your XmlTextReader instance.  Then you just do a continuous Read() loop,
> until EOF.

i can't, as the initial tag is only closed when the session is over.
imagine something like this:

(connection starts)
client: <?xml ...?><stream:stream ....>
server: <?xml ...?><stream:stream ....>
client: <auth info><.../></auth info>
server: <some answer><.../></some answer>
client: <comm1><.../></comm1>
server: <some answer><.../></some answer>
...
client: </stream:stream>
server: </stream:stream>
(connection terminates)

not a parser friendly communication ;)