Xml.XMLDoc.TXMLNodeList.IndexOf

提供: RAD Studio API Documentation
移動先: 案内検索

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

プロパティ

種類 可視性 ソース ユニット
function protected
Xml.XMLDoc.pas
Xml.XMLDoc.hpp
Xml.XMLDoc TXMLNodeList

説明

指定されたノードのインデックスを返します。

IndexOf メソッドを呼び出すと,リスト内のノードの位置を見つけることができます。位置を特定するノードは,名前またはインターフェースで指定できます。

Name は,位置を特定するノードの LocalName プロパティです。

NamespaceURI は,LocalName を解釈するときに使用する名前空間を識別します。Name が NamespaceURI パラメータなしで使用される場合(最初の構文),IndexOfDefaultNamespaceURI の値を使用します。

Node は,位置を特定するノードのインターフェースです。

IndexOf は,指定されたノードのインデックスを返します。0 は最初のノードのインデックス,1 は 2 番めのノードのインデックスです。指定されたノードがリストにない場合,IndexOf は -1 を返します。

関連項目