I\'ve chosen the title here as my problem is I need to get the Item nodes mentioned in the example. I have the following XML and am having problems using LINQ to query it, I
Assuming element is your element:
element
var ids = element.Element("items") .Elements("item") .Select(item => item.Element("id").Value);
The Element and Elements methods return only direct children, not all descendants, so it doesn't return the element which is under
Element
Elements