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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Need both parent and child loop in tXMLmap component

Hi,
Is it possible to have both parent and child loop in tXMLmap for processing XML. If not, please suggest a component which can extract all the child loop element for every parent loop.
PFB the expected result and xml format.
<parent id="498292">
    <dobs>
        <dob>1900</dob>
<dob>1910</dob>
    </dobs>
<pobs>
        <pob>INDONESIA</pob>
    </pobs>
</parent>
<parent id="1233">
    <dobs>
<dob>1950</dob>
    </dobs>
<pobs>
        <pob>INDIA</pob>
<pob>IRAN</pob>
    </pobs>
</parent>
<parent id="4568">
    <dobs>
<dob>1970</dob>
<dob>1990</dob>
    </dobs>
<pobs>
        <pob>IRAQ</pob>
<pob>INDIA</pob>
    </pobs>
</parent>
</parents>

EXPECTED RESULT:
PARENT DOB POB
498292 1900 INDONESIA
498292 1910 INDONESIA
1233         1950 INDIA
1233         1950 IRAN
4568         1970 IRAQ
4568         1990 INDIA
Labels (3)
1 Reply
Anonymous
Not applicable
Author

Hi
It is impossible to extract multiple loop elements at once, however, you can extract each loop element separately, and then do an inner join between these extracted records based on parent id to merge the data. 
Regards
Shong