我的XElement对象格式如下:我必须获取所有节点中所有属性的值,但我不知道如何:/我试过了xml.Elements("PatientFieldList")xml.Descendants("PatientsSettingsFieldsList").Where(x=>x.Attribute("PatentFieldLength").Value==64)`我有很多这样的节点,所以我想知道是否有简单的方法可以通过“[]”或某种方式访问这些属性。 最佳答案 代码:usingSystem;usingSystem.Linq;usingSy