次の方法で共有


SecurityElement.SearchForChildByTag メソッド

タグ名を指定して子要素を検索します。

Public Function SearchForChildByTag( _
   ByVal tag As String _) As SecurityElement
[C#]
public SecurityElement SearchForChildByTag(stringtag);
[C++]
public: SecurityElement* SearchForChildByTag(String* tag);
[JScript]
public function SearchForChildByTag(
   tag : String) : SecurityElement;

パラメータ

  • tag
    子要素で検索するタグ。

戻り値

指定したタグ値を持つ最初の XML 子要素。または tag を持つ子要素が存在しない場合は null 参照 (Visual Basic では Nothing) 。

例外

例外の種類 条件
ArgumentNullException tag パラメータが null 参照 (Visual Basic では Nothing) です。

解説

次の XML で、 SearchForChildByTag("second") は子要素 <second> を返します。

<thetag A="123" B="456" C="789"> <first>text1</first> <second>text2</second></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 名前空間