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: 
cyrineAttijari
Contributor
Contributor

En tXMLMap, les boucles imbriquées (nested loops)

Hello! I'm blocked trying to consume a response from a tESBConsumer in a tXMLMap. I can't define a loop inside another loop.

 

cyrineAttijari_0-1751033290505.jpeg

 

Labels (8)
1 Reply
gouravdubey5
Partner - Creator
Partner - Creator

Hello,

In tXMLMap, nested loops are not handled as procedural loops. The component works on a declarative mapping model, where looping is driven by repeating XML elements defined in the input schema.

Important points:

tXMLMap does not support explicit nested for-style loops.

Each loop is defined by selecting a loop element (repeating XML node).

Multiple loop elements are supported, but they must follow the XML hierarchy, not arbitrary nesting logic.

Supported approaches:

Define loop elements based on XML structure
If the XML contains nested repeating nodes, define each repeating node as a loop element in tXMLMap and map them according to their parent-child relationship.

Use multiple tXMLMap components
For complex nested logic, split the processing into multiple tXMLMap components:

First map/flatten the parent level

Then process child loops in a second tXMLMap

Flatten or pre-process the XML
Use components such as tExtractXMLField to normalize or flatten deeply nested XML before mapping.

Use tWriteXMLField for complex generation
If the output requires complex nested looping logic that tXMLMap cannot express, tWriteXMLField is the supported alternative.

Best practice:
tXMLMap should be used for structure-driven XML mappings, not for complex procedural loop logic. When nested iteration becomes complex, splitting the logic across multiple components is the supported and maintainable approach.

Thanks,

Gourav

Talend Solution Architect | Data Integration