Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
SMR040
Contributor III
Contributor III

Read nested XML file where the depth of the nests are not fixed

Hi all,

We want to read an XML which is nested but there is no fixed nest level. So we are not sure where to set the loop for this in the tXMLMap. Is there a way in the tXMLMap or perhaps even Data Mapper? For example it could be a relation where there are employees which can be hierarchical to each other. See in the attachment a sample structure. (please use it only for reference, it might not be 100% valid xml but i had to adjust the original one because of policies etc, the original one is valid)

So the question would be, how to handle such nested XMLs where you don't have a fixed nest level. One Employee could have 1 manager and another employee could have 5 managers. And we want to get the lowest employee in the nest, in this case "Helpdesk Employee". And also we want to get them based on the Flag tag whether its true or false.

Labels (2)
1 Solution

Accepted Solutions
SMR040
Contributor III
Contributor III
Author

Solved by using a RecursiveLoop in the Data Mapper (tHMap)!

 

https://help.talend.com/r/en-US/7.3/data-mapper-functions-reference-guide/mapping-recursive-loop

View solution in original post

1 Reply
SMR040
Contributor III
Contributor III
Author

Solved by using a RecursiveLoop in the Data Mapper (tHMap)!

 

https://help.talend.com/r/en-US/7.3/data-mapper-functions-reference-guide/mapping-recursive-loop