Solution
You can create an XML file and add new child nodes in order to have multiple elements. This code can be used as starting point using a
For Loop that can help add the amount of child nodes you need. To make the code easier we are going to use a SubVI to add the data to each child node called
XML Adder.
![XML_Multiple Children.png](/servlet/rtaImage?eid=ka03q0000012Mtz&feoid=00N0Z00000HEWRt&refid=0EM3q000001c03C)
As we see in the last scheme, we use a subVI (XML Adder .vi) to add new child nodes inside the for loop. This is how this subVI works
![XML_AdderSubVI_NoError.png](/servlet/rtaImage?eid=ka03q0000012Mtz&feoid=00N0Z00000HEWRt&refid=0EM3q000001c032)
If an error exists:
![XML_AdderSubVI_Error.png](/servlet/rtaImage?eid=ka03q0000012Mtz&feoid=00N0Z00000HEWRt&refid=0EM3q000001c037)
Using a number of TestData equals to 4, this will be the output shown in XML code indicator: