属性 (XElement 动态属性)
获取用于检索与指定扩展名称对应的属性实例的索引器。
语法
elem.Attribute[{namespaceName}attribName]
属性值/返回值
类型 XAttribute Item(String expandedName)
的索引器。 此索引器采用指定属性的扩展名称,并返回相应的 XAttribute;如果没有具有指定名称的属性,则返回 null
。
言论
此属性等效于 System.Xml.Linq.XElement 类的 Attribute 方法。