Hello,
I’m trying to chase down an infrequent XMLException. This is it:
[quote]An exception of class XMLException was not handled. The application must shut down.
Exception Message: msg: XML parse error 3: no element found. Exception Error Number: 2[/quote]
This happens about once every two weeks on an app that reaches out to a database, gets records in XML format, and then tries to parse the data and put it into a MySQL database. I think it’s rather obvious what is happening. It’s expecting an xml data element and there isn’t any. It’s probably because there is a malformed record that I’ll never be able to do anything about. I just want to handle the error, log it, and keep running. Don’t want to shut down the app.
I’ve handled other xml exception issues but this one is puzzling. It leaves no trace of which record it might be. I can’t figure out where in my code it’s originating.
Is there a clue in the Exception Message that someone might recognize? I’m throwing so many try/catch statements in the code that it’s confusing. I’m also not that good with XML.
Thanks for any suggestions.