I have an xml file that returns a set of elements that are unique by a attribute value. This presents a problem, as I can not select a node by its name:
<
With LINQ you can easily select just the nodes that have a specified attribute, like this:
var query = from node in results.Descendants("arr") // I believe you could use results.Elements("arr") here
where node.Attribute("name").Value == "ATR_FamilyName"
select new Product
{
FamilyName = node.Element("str").Value
};