You can make InterFormNG2 repeat a selection of elements in a sub-folder. The repeat element repeats e.g. the elements a number of times, where this number can be either fixed or found via an Xpath expression, but it can also repeat the sub-folder for each input node or page in the input file.
To insert a repeat element you click this element in the top of the designer:

The icon is found by clicking the '+' icon to reveal the second row of design elements:
You see the properties of the repeat element, when you insert a new or double click on an existing one in the element tree.
The number of repeats can be set in these manners:
You can use a constant as the number to repeat if you e.g. wants to insert multiple identical elements below (or beside) each other in the flow:
Above we insert 5 identical containers/boxes.
You can also use a variable with the repeat to insert a range of numbers e.g. 1 to 10:
The number of repetitions can also be set as a variable/XPath, but then you should remember to convert the value to a number:

If the repeat selects a node set that is null (no nodes match), then you will see a warning like below in the job log:

Above the node selection in the template is shown. If you want to avoid this warning, then you can insert the repeat loop inside an if element like below:
With the expression boolean(<path>) we can verify if there is at least one node in the selected node set. Instead of boolean(<path>) you can also use the condition:
count(/Root/DocumentX)>0If you e.g. want to print out all detail lines of an input XML file in the designer, then you should use the repeat design element to iterate across all detail lines of the input file.
One example is shown here.
If you have loaded the demo XML file, then you can e.g. print out all detail lines in this manner:
Add a Repeat element in the designer and click the magnifying glass on the right:
Now you can search for 'line' and click the 'Sales_Invoice_Line' node in the xml file:
- and the xml path of the node is inserted into the Repeat element:
Inside the Repeat element (e.g. in a text element), you can now refer to the relative path from the detail line node to select data from the current detail line, if you refer to the relative path like so:

/IF_Type/Sales_Invoice/Sales_Invoice_Header/Sales_Invoice_Line/Line_TypeBut you need manually to remove the path specified in the Repeat to reduce this to ./Line_Type.
If you want to create aligned columns of the detail lines, then you can e.g. use a container, where the flow direction is row and set fixed widths for each txt element of the detail lines:
With fixed widths you can create this list with the demo sample XML file:
This lists all detail lines of all the documents.