One Star

Multiple loop in a tXMLMap

Hi,
I'd like to be able to build an xml file with a double loop. (I mean imbricated loops)
<root>
<parent>parent1
<child>child1</child>
<child>child2</child>
<child>child3</child>
</parent>
<parent>parent2
<child>childA</child>
<child>childB</child>
<child>childC</child>
</parent>
</root>
I wanna use tXMLmap components, but I cannot figure out how to make it work properly.
Any tutorial/tip on that ?
3 REPLIES
One Star

Re: Multiple loop in a tXMLMap

Hi,
This post shows a usage of tXMLMap. I think your case can be coded with one loop (//child) that references the text contents of the parent (./parent).
http://bekwam.blogspot.com/2011/10/updating-xml-in-database-with-talend.html
This post has some overall xpath suggestions for use with Talend: http://bekwam.blogspot.com/2011/07/xpath-loops-in-talend-open-studio.html
Employee

Re: Multiple loop in a tXMLMap

Hi
Support of Multiloop in tXMLMap has been added in 5.1.0M2 which is now available on our website.
Warning : this is a milestone version, use it for testing new features only, not for production !
HTH,
One Star

Re: Multiple loop in a tXMLMap

Thanks for the tip.
I will try the latest milestone. Such a good timing as it has been released this week, right?...