Xml.XMLDoc.TXMLNodeList.IndexOf

De RAD Studio API Documentation
Aller à : navigation, rechercher

Delphi

function IndexOf(const Node: IXMLNode): Integer; overload;
function IndexOf(const Name: DOMString): Integer; overload;
function IndexOf(const Name, NamespaceURI: DOMString): Integer; overload;

C++

int __fastcall IndexOf(const Xml::Xmlintf::_di_IXMLNode Node)/* overload */;
int __fastcall IndexOf(const System::UnicodeString Name)/* overload */;
int __fastcall IndexOf(const System::UnicodeString Name, const System::UnicodeString NamespaceURI)/* overload */;

Propriétés

Type Visibilité  Source Unité  Parent
function protected
Xml.XMLDoc.pas
Xml.XMLDoc.hpp
Xml.XMLDoc TXMLNodeList

Description

Renvoie l'indice d'un noeud spécifié.

Appelez IndexOf pour localiser un noeud dans la liste. Vous pouvez spécifier le noeud à localiser en indiquant son nom ou son interface.

Name est la propriété LocalName du noeud à localiser.

NamespaceURI identifie l'espace de nommage à utiliser lors de l'interprétation de LocalName. Si Name est utilisé sans paramètre NamespaceURI (première syntaxe), IndexOf utilise la valeur de la propriété DefaultNamespaceURI.

Node est l'interface du noeud à localiser.

IndexOf renvoie l'indice du noeud spécifié, 0 étant l'indice du premier noeud, 1 l'indice du deuxième noeud, etc. Si le noeud spécifié n'est pas dans la liste, IndexOf renvoie -1.

Voir aussi