XML 要素で、名前を指定して属性を検索します。
Public Function Attribute( _
ByVal name As String _) As String
[C#]
public string Attribute(stringname);
[C++]
public: String* Attribute(String* name);
[JScript]
public function Attribute(
name : String) : String;
パラメータ
- name
検索する属性の名前。
戻り値
名前付き属性と関連付けられた値。または name の属性が存在しない場合は null 参照 (Visual Basic では Nothing) 。
例外
例外の種類 | 条件 |
---|---|
ArgumentNullException | name パラメータが null 参照 (Visual Basic では Nothing) です。 |
解説
次の XML で、 Attribute("B")
は "456" を返します。
<thetag A="123" B="456" C="789">text</thetag>
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
SecurityElement クラス | SecurityElement メンバ | System.Security 名前空間