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

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
pascal_dugousset
Contributor
Contributor

Talend 5.6.1 Data Services - tXMLMap and multi loops

Hi

i've to create an XML file as a standard defined by Microsoft Dynamics AX 2012.

 

to summarize the structure is:

<Header> .... </Header>

<Body>

   <SalesOrders>                                                  list of many orders

     <SalesTable>                                                  one order

       <DocuRefHeader> ... </DocuRefHeader>    a set of unlimited of this tag may be present at the Header of Sale  Order (Lists of different notes represent by couple (type,text).

       <SalesLines>                                                list of lines in one order

             <LineDocu> ... </LineDocu>                   a set of unlimited of this tag may be present on different lines (Lists of different notes represent by couple (type,text).

       </SalesLine>

     </SalesTable>

   <SalesOrders>

 

i've 5 Excel files in entry, one for Header, one for DocuRefHeader attach on Header, one for lines, one for LineDocu attach on Lines (the 5th is for delivery adress, but not cause of problem).

 

i've design my job like this

0683p000009LvXm.png

the tMap aggregate all datas with the good id (Sales Order ID or Sales Lines ID). So if for one Sales Order i've 3 DocuRef, i 'll have 3 lines in the output flow.

 

the tXMLMap realize the mapping, with option "All in one" true and "create empty element" false

the tFileOutputXML write the document generated by tXMLMap as an XML file

 

My problem: it's write only if i've one DocRefHeader or one LineDocu. How could i've loop on this 2 parts ?

i've try to use the 2 excel  files with note as lookup of the tXMLMap without success

i've try to use tFileOutputMSXML but it's complex and create some others problems (some part of XML has an identification "entity" that must to be generate only if one other tag is not empy ...)

 

thanks for your help, i'm searching since one week without success.

Labels (3)
2 Replies
Anonymous
Not applicable

Hi,

You can set multi-level loop in tXMLMap. What does your component tXMLMap setting look like? Could you please show us your XML schema?

Best regards

Sabrina

pascal_dugousset
Contributor
Contributor
Author

Hi

 

as you could see in the screenshot, i want to implement the second loop in yellow.

 

0683p000009LvBw.png