XML Script logo
Slices and indexes
Usage

Multiple elements with the same name can be indexed using square-brackets. An index is a comma separated list of ranges. A range is either a single number, or a slice specified using a~b, when a is the first element, and b is the last. Omitting a or b will take the range from the first, or to the last element, respectively. The special value of "$" refers to the last element. Use of "0" as an index value is deprecated.

Examples

Multiple indexes and slices

Indexing the last element

Multiple slices

Single index

Index and slice

Open ended slices

Version

1.0

Ref

t.31

Date

19 March 1999

XML Script homepage | Documentation home | XML Script docs | Command list | Function list | X-Tract docs

X-Stream, X-Tract and XML Script are trade marks of DecisionSoft Limited
© Copyright 1998-2000 DecisionSoft Limited