我有一个XDocument对象.我想使用LINQ在任何深度查询具有特定名称的元素.当我使用时Descendants("element_name"),我只获得了当前级别的直接子元素.我正在寻找的是相当于XPath中的"// element_name"...我应该使用XPath,还是有办法使用LINQ方法?谢谢.
XDocument
Descendants("element_name")
XPath
.net c# xml linq linq-to-xml
.net ×1
c# ×1
linq ×1
linq-to-xml ×1
xml ×1