Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

XML with several loops

Hi everyone,

I need help to develop a job that generates a multi-loops XML.

 

Basically

the "decla" tag is repeated several times (loop) and contains the output 3 others loop-tags : "souscripteur", "assure" and "beneficiaire" (in yellow here after)

0683p000009LrpN.png

 

All the Talend Components support only one definited loop.

How can i do to obtain that structure ?

 

Thanks a lot for your answers

 

Best regards

Tatiana

Labels (3)
2 Replies
Anonymous
Not applicable
Author

There are several ways to do this....

1) Use the Talend Data Mapper. But that is only available to the Enterprise Edition users....and is a bit funky if you are using it for the first time.
2) Use a bit of Java. Unfortunately the tXMLMap just won't cover this requirement on its own. But what you can do is create your base XML structure using a tXMLMap and then add to it using some Java (....my favourite approach). 

3) Similar to the last approach, but instead of writing Java code to manipulate and add to DOM objects, you build your base XML structure and then build your sub-XML structures (your loops), convert everything to Strings and then carry out a find and replace to build up your final XML structure.

To be honest, they are all quite tricky at first. But once you figure out the structure and the method, it is actually quite methodical.

Anonymous
Not applicable
Author

Hello Rhall.
Thanks for solutions. The first one would not be possible because i have to stay in a data integration context.
So i'll try the second one on mondey and leave a message in any case.
Thanks Again for your help .
Tatiana