Skip to content


The iterateElem(xmlID) method iterates over all elements on the same level and returns false when there are no other elements, true otherwise.

For example, considering the following XML document and the related current positions:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<DOMAINTREE>                                                <-- Parent position
    <DOMAIN NAME="1" LABEL="one">                           <-- Main position
        <DOMAIN NAME="1.1" LABEL="">                 <-- Child position
            <DOMAIN NAME="1.1.1" LABEL=""/>      
            <DOMAIN NAME="1.1.2" LABEL=""/>
    <DOMAIN NAME="2" LABEL="two"/>                          <-- Element 1
    <DOMAIN NAME="3" LABEL="three"/>                        <-- Element 2

The instruction:

var iterElem = XML.iterateElem(xmlID); 

returns true in the iterElem variable because the current main position has two elements on the same level.

The syntax is:


where xmlID is the ID of the XML document.