Skip to content


The iterateChildElem(xmlID) method iterates over all the children of an element and returns false when there are no other children, true otherwise.

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

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

The instruction:

var iterChildren = XML.iterateChildElem(xmlID); 

returns true in the iterChildren variable, because the current main position has two children.

The syntax is:


where xmlID is the ID of the XML document.