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
public SecurityElement SearchForChildByTag(
 string tag
public: SecurityElement* SearchForChildByTag(
 String* tag
public function SearchForChildByTag(
   tag : String
) : SecurityElement;


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.


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


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

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



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

© 2014 Microsoft