[Mono-list] parsing an incomplete xml

Chris Bruner cryst@golden.net
Mon, 19 Jul 2004 01:46:41 -0400


I believe that the xml spec says that parsing should stop as soon as an error 
occurs. (This includes begin incomplete). 

Therefore the only way you could "fix" it would be to have a completion string 
built up. So that you would mark every tag that get's added, and unmark them 
as they are done. eg <tag></tag> Also tags that end with /> can be thought of  
as finished.  Then when you find the stream has died, you just complete all 
the tags. 

The downside is that this means you are doing the job of parsing the xml 
before the parser. Seems like a lot of work.

On July 18, 2004 07:56 pm, Krisztian PIFKO wrote:
> hi,
>
> should someone please tell me how to parse an incomplete xml?
> i'm reading the xml asynchronously from a socket and i need to
> parse it continously as it arrives.
> when i feed the incomplete xml into XmlTextReader it hangs at
> the first unclosed element.
>
> thanks in advance,
>
> Krisztian PIFKO
>
>
> _______________________________________________
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list

-- 
NOBODY LIKES SUNBURN SLAPPERS
NOBODY LIKES SUNBURN SLAPPERS
NOBODY LIKES SUNBURN SLAPPERS
NOBODY LIKES SUNBURN SLAPPERS

	Bart Simpson on chalkboard in episode 7F23