Hi all ,
I have a below XML structure,
<Products>
<Product>
<Item quality="good">GW001</Item>
<Item quality="bad">BW001</Item>
<InStock>Yes</InStock>
</Product>
<Product>
<Item quality="good">GW002</Item>
<Item quality="bad">BW002</Item>
<InStock>Yes</InStock>
</Product>
</Products>
and I have a below code to get the list of products out of the above xml
var products = xmlDocument.GetElementsByTagName("Product");foreach (XmlNode node in products)
{
/////
}
and I wanted to populate my own list like below ,
myitems.Add(new ProductItem() {good = "GW001",bad = "BW001",InStock ="Yes"});
myitems.Add(new ProductItem() {good = "GW002",bad = "BW002",InStock ="Yes"});
could some one help me to get this ?
thanks