I have been asked to debug code that uses the Deserialize Method in the XmlSerializer class to deserialize a string with a large and complicated XML into a large and complicated C# object with a given type.
The XML document comes from customers. Often the XML document has problems so it cannot be deserialized properly. For example, it may have a non-numeric value that has to go into a numeric field somewhere.
When Deserialize finds a problem it throws an exception, but that doesn't tell me which XML element and what value are causing the issue. This makes finding the problem in the XML document very time consuming.
Is there some way or tool to help me pinpoint the specific XML element and/or value in the XML document?