Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
gunnard_fredrickson
Contributor II
Contributor II

Problem with looping in xpath

I have an api I am using. I am bringing it in to a tMapXML. I am able to read it successfully, but I am running into an issue. The problem is that it has several different levels. It is for a retail company. For example, someone orders several items. Some of the items are part of a bundle and some are not. IF the first item is listed as not part of a bundle I have gotten the API to loop properly and Item A will go to the table on one line and Item B will go to the table on a separate line. But if the API lists the first item as part of a bundle, then it is just not reading the second line so the second line is not getting written. I have a loop set and it is reading all the records. But if I set the loop at the bundle level then it goes into an infinite loop.

Any suggestions?

Labels (5)
2 Replies
Anonymous
Not applicable

Hello @Gunnard Fredrickson​ ,

To help us better understand your issue, could you please provide the xml file content and the snapshot of the tXMLMap settings in your job?

 

Best regards

Aiming

 

jlolling_kloeckner
Contributor
Contributor

You will not be able to do the task in only one tMapXML. I suggest you iterate over the top level elements and extract from here the different sub documents and lead them also to tMapXML and parse them differently for every different sub document. You can do that as often you want in unlimit depth of the documents.