"CindyH" <ch*******@new.rr.comschreef in bericht
news:%2***************@TK2MSFTNGP05.phx.gbl...
>I have an xml stream that I would like to read with xmltextreader.
Problem is that there are some & inside the xml stream.
Parse is not working on them.
Can someone show me sample code for reading a stream like this?
Cor Ligthert[MVP] wrote:
No.
Because it with that "&" is not XML.
A thought ...
The XmlReader classes are inheritable. Do you know of anyone who's
experimented with creating XmlReader subclasses that can detect (and
correct) this kind of thing as the Xml text is read in?
I /may/ be looking at doing something similar, and an extended XmlReader
would be ideal. I'm thinking of writing Xml-formatted log files that
/lack/ a closing root element tag. These can be appended to, like
regular text log files (quick and simple) and a customised XmlReader
could "spot" the errant End-Of-File and append the missing tag, as the
text is read "back in".
Haven't tried it yet, though.
Regards,
Phill W.