RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TXMLNodeList.IndexOf Method (DOMString)

Returns the index of a specified node.

Pascal
function IndexOf(const Node: IXMLNode): Integer; overload;
function IndexOf(const Name: DOMString): Integer; overload;
function IndexOf(const Name: DOMString; const NamespaceURI: DOMString): Integer; overload;
C++
__fastcall int IndexOf(const IXMLNode Node);
__fastcall int IndexOf(const DOMString Name);
__fastcall int IndexOf(const DOMString Name, const DOMString NamespaceURI);

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. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!