XML Script logo
_foreach command
Usage

The _foreach command takes a series of elements and processes each one in turn. This is partitularly useful when you have an array, since you can easily iterate through it.

Using the _break command inside a _foreach loop will break out of the loop immediately and execution will continue after the closing

Examples

The _foreach command

Empty _foreach

Nested _foreach

Simple _for with default index

Foreach within template

_for within _foreach

Using _foreach with a _break command

Using _foreach with a null element

Version

1.0

Ref

t.34

Date

12 May 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