次の方法で共有


Attribute (XElement 動的プロパティ)

指定された展開名に対応する属性のインスタンスの取得に使用するインデクサーを取得します。

elem.Attribute[{namespaceName}attribName]

プロパティ値/戻り値

XAttribute Item(String expandedName) 型のインデクサー。 このインデクサーは、指定された属性の展開名を受け取り、対応する XAttribute を返します。指定された名前を持つ属性がない場合は、null を返します。

解説

このプロパティは、System.Xml.Linq.XElement クラスの Attribute メソッドに相当します。

参照

参照

Value (XAttribute 動的プロパティ)

XElement.Attribute

概念

XElement クラスの動的プロパティ