Re: XMLReader skip current element

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Alex <alt7@xxxxxxx> wrote:
Right. It's an invalid XML file. I would strongly recommend that you
completely reject such files - trying to cope with broken files like
this is a real pain, and I don't know whether XmlReader (or any of the
other .NET XML types) support it.

Sure, i made file to be invalid manually, because i want to add some
improvements to my code, to avoid or solve this problem.

Is there any real reason why you need to handle an invalid XML file?
Most XML-based applications don't, as far as I'm aware. (Obviously XML
editors have to, but other than that...)

This is just fragment, now file size is 100KB and will be bigger
later.
Also, this file is like XmlSerialization of some classes i want to be
serialized.
So, the data which stored are big, and i really don't want user to
fill out all again.

So, if there is some solution about this, i will be glad to here.

Why would the user have to fill anything out again? Why are you
expecting invalid XML?

--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
.