Microsoft XML 2.5 SDK


 

index Method

[This is preliminary documentation and subject to change.]

Returns the index number of the node within the parent.

Syntax

index()

Remarks

Indexes are zero-based, so 0 is the first element. Returns a number.

Examples

Find the first 3 degrees:

degree[index() $lt$ 3]

Note that the index function is with respect to a parent. Consider the following data:

<x>
  <y/>
  <y/>
</x>
<x>
  <y/>
  <y/>
</x>

Find the first y from each x:

x/y[index() = 0]