I'm looking to map multiple XML attributes in nested elements into a single POCO class using the XmlSerializer object.

**XML**

```
<products grand-total="100">
    <one price="50" />
    <two price="20" />
    <tree price="30" />
</products>

```

**POCO**

```
public class Product
{
    public int GrandTotal { get; set; }
    public int OnePrice { get; set; }
    public int TwoPrice { get; set; }
    public int ThreePrice { get; set; }
}

```

**C#**

```
var doc = XDocument.Load("XmlDoc.xml");
var serializer = new XmlSerializer(typeof(Product));
var reader = doc.Root.CreateReader();
var temp = (Product)serializer.Deserialize(reader);

```

It would be awesome if anyone knows how I can do this.

Thanks.