SecurityElement.SearchForTextOfTag メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > SecurityElement.SearchForTextOfTag メソッドの意味・解説 

SecurityElement.SearchForTextOfTag メソッド

タグ名を指定して子要素を検索し、格納されているテキストを返します。

名前空間: System.Security
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Function SearchForTextOfTag ( _
    tag As String _
) As String
Dim instance As SecurityElement
Dim tag As String
Dim returnValue As String

returnValue = instance.SearchForTextOfTag(tag)
public string SearchForTextOfTag (
    string tag
)
public:
String^ SearchForTextOfTag (
    String^ tag
)
public String SearchForTextOfTag (
    String tag
)
public function SearchForTextOfTag (
    tag : String
) : String

パラメータ

tag

子要素で検索するタグ。

戻り値
指定したタグ値を持つ最初の子要素のテキストの内容。

例外例外
例外の種類条件

ArgumentNullException

tag が null 参照 (Visual Basic では Nothing) です。

解説解説

このメソッドは、次のコードと等価です。

String SearchForTextOfTag(String tag) { 
     SecurityElement element = this.SearchForChildByTag(tag);
     return element.Text;
  }

次の XML で、SearchForTextOfTag("second") は "text2" を返します。

<thetag A="123" B="456" C="789"> <first>text1</first>
    <second>text2</second></thetag>
使用例使用例

SearchForTextOfTag メソッドを使用して、子のタグ名を指定して子を検索し、格納されているテキストを返す方法を次のコード例に示します。このコード例は、SecurityElement クラスのトピックで取り上げているコード例の一部分です。

Dim storedDestroyTime As String
 = localXmlElement.SearchForTextOfTag("destroytime")
string storedDestroyTime =
    localXmlElement.SearchForTextOfTag("destroytime");
String^ storedDestroyTime = localXmlElement->SearchForTextOfTag( L"destroytime"
 );
String storedDestroyTime = localXmlElement.SearchForTextOfTag(
    "destroytime");
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

SecurityElement.SearchForTextOfTag メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



SecurityElement.SearchForTextOfTag メソッドのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS