System.Security.SecurityElement.SearchForTextOfTag Method

Finds a child by its tag name and returns the contained text.

Syntax

public string SearchForTextOfTag (string tag)

Parameters

tag
The tag for which to search in child elements.

Returns

The text contents of the first child element with the specified tag value.

Remarks

This method is equivalent to the following:

code reference: System.Security.SecurityElement#1

With XML as follows, SearchForTextOfTag("second") would return "text2".

Example

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

Requirements

Namespace: System.Security
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0