Command "SelectFirst"

Summary

Selects the first element returned by a XPath-query. The command belongs to the group "Control".


Parameters

Parameter Name Description Type
NodeRef The name of the reference to the node on which the XPath-query is executed. nodeReference
SelectedEleRef The name of the reference under which the selected element will be accessible. saveElementReference
XPath The XPath-query statement. xpath

Valid parameter combinations



Description

Selects the first of a number of elements selected with an XPath expression. "SelectedEleRef" references the selected element.

Examples


Example 1

The example below selects the first of a number of elements having an attribute named "Color". "mySelectedElement" refernces the selected element.
<SelectFirst NodeRef="$myElement" XPath="//element[@Name='Color']" SelectedEleRef="$mySelectedElement"/>