XmlException

  • Thread starter Thread starter news.microsoft.com
  • Start date Start date
N

news.microsoft.com

I am using the XmlReader to look at some xml data fragments.

Many times the xml fragment is not readable by the XmlReader, since it isn't
valid.
For example, I may be looking at only the text </MyXmlNode>.
If I try to read this, I get an exception because it is a closing node with
no opening node.

My problem is that there is no way for me to know what the exception is.
The only exception that is thrown is "XmlException" which does not have a
public ErrorCode property, or anything else that I can look at.

There is a Message property, but that is pretty much useless to me.
I have other exceptions that are thrown, like Nodes that have invalid ( non
printable ) characters. Again, all I know is that there was a problem. No
information on what the problem might have been.

Is there another way to do this so that I can intelligently fix the problem
and try to re-read the Node?

Thanks
Jeff
 
Obviously this is a bug.
Does anyone have any idea if this is going to be fixed in the future?

Jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top