using System.Collections.ObjectModel;
using System.Xml.Serialization;
public static void Main()
var result = Serializer.Deserialize();
Console.WriteLine("child[0].Value: {0}", result.CollectionProperty[0].ProductTypeName);
Console.WriteLine("child[0].Value: {0}", result.CollectionProperty[1].ProductTypeName);
public static class Serializer
public static RootClass Deserialize()
var type = typeof (RootClass);
var serializer = new XmlSerializer(type);
<Product ProductType_Name='ANZ Progress Saver' ProductType_Code='ANZPS' ProductType_Id='25000' />
<Product ProductType_Name='ANZ Progress Test' ProductType_Code='Test' ProductType_Id='25001' />
using (var stringReader = new StringReader(xmlString))
return serializer.Deserialize(stringReader) as RootClass;
public Collection<ZafinProductDTO> CollectionProperty;
public class ZafinProductDTO
[XmlAttribute("ProductType_Name")]
public string ProductTypeName { get; set; }
[XmlAttribute("ProductType_Code")]
public string ProductTypeCode { get; set; }
[XmlAttribute("ProductType_Id")]
public string ProductTypeId { get; set; }