Export (0) Print
Expand All

SecurityElement.SearchForChildByTag Method

Finds a child by its tag name.

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

Parameters

tag
The tag for which to search in child elements.

Return Value

The first child XML element with the specified tag value, or a null reference (Nothing in Visual Basic) if no child element with tag exists.

Exceptions

Exception Type Condition
ArgumentNullException The tag parameter is a null reference (Nothing in Visual Basic).

Remarks

With XML as follows, SearchForChildByTag("second") would return the child element <second>.

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

<second>text2</second></thetag>

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

SecurityElement Class | SecurityElement Members | System.Security Namespace

Show:
© 2014 Microsoft