SecurityElement.SearchForChildByTag(String) Método

Definição

Localiza um filho pelo nome da marca.

public:
 System::Security::SecurityElement ^ SearchForChildByTag(System::String ^ tag);
public System.Security.SecurityElement? SearchForChildByTag(string tag);
public System.Security.SecurityElement SearchForChildByTag(string tag);
member this.SearchForChildByTag : string -> System.Security.SecurityElement
Public Function SearchForChildByTag (tag As String) As SecurityElement

Parâmetros

tag
String

A marca para a qual pesquisar em elementos filho.

Retornos

O primeiro elemento XML filho com o valor de marca especificado ou null se nenhum elemento filho existir tag .

Exceções

O tag parâmetro é null.

Exemplos

O código a seguir mostra o uso do SearchForChildByTag método para localizar um filho pelo nome da marca. Este exemplo de código faz parte de um exemplo maior fornecido para a SecurityElement classe.

if (localXmlElement.SearchForChildByTag("destroytime") != null)
If Not (localXmlElement.SearchForChildByTag("destroytime") Is Nothing) Then

Comentários

Com XML da seguinte maneira, SearchForChildByTag("second") retornaria o elemento <second>filho.

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

Aplica-se a