XML Loop


This task allows you to loop through data in a XML file using XPath Expression. There are a number of tutorials online on XPath expressions.
The XPath expression entered should result in a list of values.
The task will then loop through each value satisfying the XPath expression.
With every loop, you can run another task.


Consider the following XML file:
(contacts)
(contact id="1")
(firstname)John(/firstname)
(lastname)Doe(/lastname)
(/contact)
(contact id="2")
(firstname)Jane(/firstname)
(lastname)Deer(/lastname)
(/contact)
(/contacts)

If XPath Expression = /contacts/contact/firstname, for each loop the following variable would be set:
CurrentValue = John or CurrentValue = Jane