How to create nested loop

I try to create a workflow to parse a set of XML files. And I need to create a nested loop to finish this task. So Here is my workflow. Each loop works fine indepently. But when I try to combine them into one it failed on the XPath.

Would you please give me some samples.

Thank you.

You should delete the last Loop End Node.

There must always be the same number of loop start as of loop end nodes.

I find an easy way of making nested loops clearer is to the inner loops into metanodes.

I removed the useless last loop end and colapse the inner loop into meta node. But the problem remains. :(

The XPath Node with the red cross complains:

Can't merge FlowVariable Stacks!(likely a loop problem.)

I don't know how to handle it.


Try connecting the flow variable output port of the first loop node to the input flow variable port of the Table creator node. 

It looks like you may have crossed your loops by connecting the XML reader to the XPath upper node. The first loop end node doesn't know which loop start node it should belong to. 



1 Like

Dear Sam,

    Thank you very much. It works.  :)