469,592 Members | 1,674 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,592 developers. It's quick & easy.

On Error move to next node using XmlValidatingReader.Read() method


I am using the XmlTextReader along XmlValidatingReader for parsing the XML file. Becuase of the foreign characters sometimes I get the "There is an invalid character in the given encoding" error. I know this is the issue of Encoding and when I change the Encoding, my Parser works just fine.
For reading & moving to next node, I use Read method of XmlValidatingReader. What I am trying is in case if error occurs how can I ignore or handle that and move to next node. What I saw that Read method is not moving to next node once the ReadState becomes Error. Any suggestions on this regard will be very helpful.

Jul 19 '07 #1
1 1851
2,057 Expert 2GB
I find it very unlikely they would have such a method. If such an error occurred, the reader can generally no longer recognize what context it is in, thus can no longer validate.
Jul 19 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Bill Cohagan | last post: by
1 post views Thread by Chris Fink | last post: by
reply views Thread by muralidharan | last post: by
5 posts views Thread by Patrick | last post: by
2 posts views Thread by nexus024 | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.