This question shows research effort; it is useful and clear
0
This question does not show any research effort; it is unclear or not useful
Bookmark this question.
Show activity on this post.
我如何知道项目是否为空(空)?
xmlDoc = XDocument.Load("file.xml");
IEnumerable<XElement> item =
from el in xmlDoc.Descendants("Item")
where (string)el.Attribute("Name") == "Google"
select el;