Xml.XMLDoc.TXMLNodeList.IndexOf

From RAD Studio API Documentation
Jump to: navigation, search

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 */;

Properties

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

Description

Returns the index of a specified node.

Call IndexOf to locate a node in the list. You can specify which node to locate using its name or its interface.

Name is the LocalName property of the node to locate.

NamespaceURI identifies the namespace to use when interpreting LocalName. If Name is used without a NamespaceURI parameter (the first syntax), IndexOf uses the value of the DefaultNamespaceURI property.

Node is the interface of the node to locate.

IndexOf returns the index of the specified node, where 0 is the index of the first node, 1 is the index of the second node, and so on. If the specified node is not in the list, IndexOf returns -1.

See Also