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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

XML with nested Loops, any idea ?

Folks,

I have a question for ya talend cracks.
Its quite easy.



Given a very simle DataModel, maybe in Access:

0683p000009MGiC.png













I want to create this nested XML:
0683p000009MGlq.png















It is no Problem to use tFileOutputMsXML:

0683p000009MGso.png







Attached you find zipped: Data, project.zip and *.xsd:

NestedLoops.rar






But the disadvantage of this component - it creates only files, so using with REST/ESB needs ugly Workaround.

Has any one a solution with tXmlMap or any other components creating document as stream (not as file) ?

Any ideas ?

Labels (2)
4 Replies
Anonymous
Not applicable
Author

It is impossible to generate this document on tXMLMap, you can read the file as a document with tFileInputXML after you generate the XML file with tFileOutputMSXML, see
0683p000009MGoE.png
Anonymous
Not applicable
Author

Shong, thanks for your Response ...
If Workaround with fixed file Name ... i get an Problem with concurrency ? (Next call writes same File-Name, prev call reads) in ESB Environment ?
Anonymous
Not applicable
Author

You are right, it may cause conflict to read the same file if many calls at the same time, it is better to define a dynamic file name, for example, define the file name with current datetime in the beginning of job on a tJava:
context.filename=formatDate("yyyyMMddHH:mm:ss",TalendDate.getCurrentDate())+".xml";

It will generates a file name like 20151116121511.xml

and delete the file in the end of job if needed. 
Anonymous
Not applicable
Author

This is what we call "an ugly Workaround"