xmlexception

What does the org.apache.xmlbeans.XmlException with a message of "Unexpected element: CDATA" mean?

I'm trying to parse and load an XML document, however I'm getting this exception when I call the parse method on the class that extends XmlObject. Unfortunately, it gives me no ideas of what element is unexpected, which is my problem. I am not able to share the code for this, but I can try to provide more information if necessary. ...

XmlException was unhandled???

This has been annoying me for sometime and I cannot figure out why. I need someone with a keen eye to spot where I could have gone wrong. The exception is thrown by this: public static string[] getKeywords(string filename) { var xmlFile = new XElement(filename); string[] keywords = xmlFile.E...

Exceptions with DateTime parsing in RSS feed in C#

I'm trying to parse Rss2, Atom feeds using SyndicationFeedFormatter and SyndicationFeed objects. But I'm getting XmlExceptions while parsing DateTime field like pubDate and/or lastBuildDate. Wed, 24 Feb 2010 18:56:04 GMT+00:00 does not work Wed, 24 Feb 2010 18:56:04 GMT works So, it's throwing due to the timezone field. As a ...

Where can I find a list of all possible messages that an XmlException can contain?

I'm writing an XML code editor and I want to display syntax errors in the user interface. Because my code editor is strongly constrained to a particular problem domain and audience, I want to rewrite certain XMLException messages to be more meaningful for users. For instance, an exception message like this: '"' is an unexpected token...

If XmlException.SourceUri is read-only, what good is it?

I have a couple places in my code where it throwing a new System.Xml.XmlException seems appropriate. I could just do throw new XmlException("Your XML sucks go fix it then try again."); But I think it's better to take advantage whenever possible of members particular to the exception class (otherwise ya might as well throw a plain ol...