Problem Deserializing xml to class using DataContractSerializer
-
Hello. I have a problem deserializing a xml reply to a class. The message I receive is: <?xml version="1.0" encoding="UTF-8" standalone="no" ?> <ItemsSummary> <ItemSummary> <No>1000</No> <Description>Bicycle</Description> <Description2 /> <ImagePath /> <Dim1Code>SALES</Dim1Code> <Dim2Code>MERCEDES</Dim2Code> <Division /> <ItemCategory>MISC</ItemCategory> <ProductGroup /> <Inventory>30</Inventory> <UnitPriceVAT>502.462,06</UnitPriceVAT> <CurrencyCode>ISK</CurrencyCode> </ItemSummary> <temSummary> <No>1500</No> <Description>Lamp</Description> <Description2 /> <ImagePath /> <Dim1Code /> <Dim2Code /> <Division /> <ItemCategory /> <ProductGroup /> <Inventory>818</Inventory> <UnitPriceVAT>0,00</UnitPriceVAT> <CurrencyCode>ISK</CurrencyCode> </ItemSummary> </ItemsSummary> I have a class structure: <pre>namespace WebService { [DataContract(Namespace="")] [KnownType(typeof(ItemSummary))] public class ItemsSummary { private List<ItemSummary> _itemSummary = new List<ItemSummary>(); [DataMember(Order = 1)] public List<ItemSummary> ItemSummary { get { return _itemSummary; } set &