标签: .net xml xpath linq-to-xml
答案 0 :(得分:1)
您可能想考虑使用 XPath ..
XmlNodeList list = xmlDoc.SelectNodes("//nodeType[@attrName=attrValue]"); //This selects all elements of type 'nodeType' occuring anywhere in the document //having 'attrName' attribute of value 'attrValue'