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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
idembele
Contributor
Contributor

CREATE XML FILE

Hi All,

I have a delimited file, which look like that:

father_id;father_name;children_id;children_name;children_birthdate

01;ndika;120;toto;25/04/2020
01;ndika;121;titi;20/032019

02;nj0120;523;nantes;10/06/2000
03;jf2563;426;leHavre;5/07/2001

 

And i want to generate a XML file by father di which will be for example like that for father_id = 01

<root>
<father_id>01</father_id>
<father_name>ndika</father_name>
<childrens>
<children_id>120</children_id>
<children_name>toto</children_name>
<children_date>25/04/2020</children_birthdate>
</childrens>
<childrens>
<children_id>121</children_id>
<children_name>titi</children_name>
<children_date>20/032019</children_birthdate>
</childrens>
</root> 
 
May somebody tell me how to do it please ?
Labels (4)
2 Replies
DaniZ
Partner - Contributor III
Partner - Contributor III

You can use a tXMLMap. Import the XML structure from a file which has a copy of your desired output (correct the errors there).

Set a loop on "childrens" and an aggregation on father_id, and you should get 3 separate XML outputs (based on your input) of which the 1st will have the aggregation in your example. 

 

idembele
Contributor
Contributor
Author

Thanks Daniz