var attrValue = from a in ( from x in root.Descendants() select x //根节点下所有的Element ).Attributes() //获得每个Element的Attribute select a.Value;