I'm trying to get all the email nodes for the customers in the sample xml and binding it to a grid. I can't seemt to get past the linq query!
Sample XML:
<group>
<customer>
<email>[email protected]></email>
</customer>
<customer>
<email>[email protected]</email>
</customer>
</group>
var query = from result in xml.Elements("customer")
select new
{
email = xml.Element("email").Value
};
gridview1.DataSource = query;
gridview1.DataBind();