If the issue is that you have two XML files and you've generated a class from the first, but the second doesn't deserialise into it, then I'd recommend generating a class from your second file too & then put both classes into something like this so you can see the differences more clearly:
https://www.diffchecker.com
input string was not in a correct format in Class
I know this error, try to parse string into int for example.
I've made a .CS class file against Paste Special in the edit menu of VS 2017. On dat moment no problem is I import the XML file where I imported the class file from. If I take another XML file it fail with the error input string was not in a correct format. I do nothing know about serilisation but I suspect the following lines:
[System.SerializableAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true,
Namespace = "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2")]
[System.Xml.Serialization.XmlRootAttribute(Namespace = "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2",
IsNullable = false)]
errors
bij System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
bij System.Number.ParseUInt32(String value, NumberStyles options, NumberFormatInfo numfmt)
bij Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderInvoice.Read14_Item(Boolean isNullable, Boolean checkType)
bij Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderInvoice.Read15_AccountingSupplierPartyParty(Boolean isNullable, Boolean checkType)
bij Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderInvoice.Read16_AccountingSupplierParty(Boolean isNullable, Boolean checkType)
bij Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderInvoice.Read45_Invoice(Boolean isNullable, Boolean checkType)
bij Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderInvoice.Read46_Invoice()
Somebody knows this serialisation error?
Greetings Rinaldo
1 answer
Sort by: Most helpful
-
P a u l 10,751 Reputation points
2021-11-26T09:33:17.767+00:00