I have verified with multiple XML validators to ensure the document is sound.
In one area of the document, anything after it the C# debugger will say the first character of the next line (after indent; did try having the entire document with none as well) is not formatted correctly:
System.InvalidOperationException: There is an error in XML document (11, 5). ---> System.FormatException: Input string was not in a correct format.
Here is the reader/deserialize part of the code:
XmlSerializer serializer = new XmlSerializer(typeof(VehicleModelInfo));
using (StreamReader reader = new StreamReader(filePath, Encoding.UTF8))
{
try
{
return (VehicleModelInfo) serializer.Deserialize(reader);
}
catch (System.InvalidOperationException e)
{
Console.WriteLine(e);
[...]
This is the problematic line:
<PovCameraVerticalAdjustmentForRollCage value="0.000000" />
It, along with the other elements in the XML are declared:
[XmlElement("PovCameraVerticalAdjustmentForRollCage")]
public float PovCameraVerticalAdjustmentForRollCage { get; set; }
I cannot figure out why this one (there are many other float values in the XML) in particular is not behaving.
Any advice would be appreciated.