array:get
Returns the value at the specified position in the supplied array (counting from 1).
get($array as array(*), $position as xs:integer) ➔ item()*
Arguments | ||||
| $array | array(*) | The input array | |
| $position | xs:integer | The specified position | |
Result | item()* | |||
get($array as array(*), $position as xs:integer, $default as item()*) ➔ item()*
Arguments | ||||
| $array | array(*) | The input array | |
| $position | xs:integer | The specified position | |
| $default | item()* | ||
Result | item()* | |||
Namespace
http://www.w3.org/2005/xpath-functions/array
Links to W3C specifications
XPath 3.1 Functions and Operators
XPath 4.0 Functions and Operators
Saxon availability
Available in all Saxon editions. Implemented since Saxon 9.7. Available for all platforms.
Notes on the Saxon implementation
Available since Saxon 9.7.
XPath 4.0 introduces a 3-argument form of this function in which a default
value can be supplied that is returned when $position is out of bounds,
rather than this producing an error. This is implemented since Saxon 13.