Click to return to the XML (Extensible Markup Language) home page    
end Method     nodeName Method     Information Methods    
Web Workshop  |  XML (Extensible Markup Language)

index Method


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]


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.