Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.

Neil Frost
I have a response from a web site in XML which looks like this:

        <address1>15 Nowhere</address>
        <address1>21 Tuesday Street</address>
        <address1>12 Somewhere</address>

...... and so on


I then have another set of web services to return iterating through the XML eg

I've returned the XML above in VisualCron
I need to access<deviceid> 

This will return a set of XML for the next part of the process


I would write this to an xml file called <deviceid>_details.xml

eg I should at the end of the task return 3 files (or as many files as there are deviceid's)

I'm assuming that I would use the loop function, but I'm not sure how to pick up the deviceid and pass that to the next tasks URL then iterate through the process again for the next deviceid.

Could someone help please?

Forum information
I don't use xml a lot, so I can't help you there. But generally speaking, if you want to do a nested loop in VisualCron, the second loop must be a separate job. So in job1 you create a loop, fetch the data you need, and the call a another job (using the Internal - job/task control). In the second job you can have a new loop.


To read the deviceid's, you need a Read Node task for the XML file.
Use the xpath query:


and deselect the optioin 'select single node'.
This should give a list of all the deviceid's in the XML file.

The next tasks are in a loop and the loop uses the previous list as the itterator. So you can use the current X value variable as the deviceid.
You can use tasks to query a new webserver and save data to a file, all using the current X value variable in the loop.

Good luck!

NB, your XML files has an error, the address tag start with <address1> and closes with an </address> tag. Typo? The 1 is wrong here.
Uses Visualcron since 2006.
Hi Eric,

Thank you for posting this. I have been trying to figure this out for a while.

I was able to create a task to pull all the GUIDs, but I am still struggling to execute your approach. ..not exactly sure how/where to define the loops.

My XML is the following.I am using GUID as the unique id for each item. Ultimately, I need to enter each item into an SQL database. Any advice is greatly appreciated. Thank you!

<guid isPermaLink="false">91bf6c49-ccf2-4e35-b17c-e98602ed967d</guid>
<title>Title 01</title>
<description>This is the description for title 01</description>
<media:content ype="video/mp4" url="https://test/penty081617d_1756.mp4"/>
<media:thumbnail isDefault="false" url="https://test/640x-5.jpg"/>
<pubDate>Wed, 16 Aug 2017 17:02:24 GMT</pubDate>

<guid isPermaLink="false">b6b0402f-f2d4-489a-818d-ed3c8786bc20</guid>
<title>Title 02</title>
<description>This is the description for title 02</description>
<media:subTitle type="application/ttml+xml" lang="en-us" url="https://test/penty081617d_CC.DFXP"/>
<media:content ype="video/mp4" url="https://test/penty081617d_1800.mp4"/>
<media:thumbnail isDefault="false" url="https://test/640x-1.jpg"/>
<pubDate>Wed, 16 Aug 2017 08:41:09 GMT</pubDate>
Scroll to Top