Attribute (XElement 動的プロパティ)

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

構文

elem.Attribute[{namespaceName}attribName]

プロパティ値/戻り値

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

Remarks

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

関連項目