Please enable JavaScript to view this site.

Altova MobileTogether Designer

The Break Loop action (see screenshot below) is used within a loop and is used to exit the loop. If you want the loop to be exited when a specific condition is fulfilled, you must specify this condition in, say, an If-Then action, and place the Break Loop inside the If-Then action (see screenshot below). If you do not place the Break Loop action within a condition, then the loop will be broken directly the Break Loop action is encountered.

MTDLoop

The actions that are performed in the loop that is shown in the screenshot above are described in the Loop topic. Here, we focus on the Break Loop action. In our example (see screenshot above), the Break Loop action is executed when the number of appended nodes in $XML2 reaches 5. When the iteration over the sixth Product element of $XML1 starts, the condition condition defined in the If clause is checked. The XPath expression for the condition is: count($XML2/Products/Product) = 5, which now evaluates to true(). As a result, the Then clause is executed and the loop is exited. See screenshot below.

MTDLoopDataCopy

Also see the description of the Loop action (previous topic).

 

© 2019 Altova GmbH