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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

CSV to Multiple xml file conversion

Hi,
I want to convert csv file to multiple xml file based on the record value, TAdvancedFileOutputXML component convert the entire csv to one xml.
How to create multiple xml based on values.
thanks a lot.
Labels (3)
6 Replies
Anonymous
Not applicable
Author

Hello
Can you show some input data and what are you expected result?
Best regards
shong
Anonymous
Not applicable
Author

Hi Shong,
i have a csv file with 4 columns named
Country city name age
Singapore shong test 23
Singapore shong test1 15
Hongkong xxxx velu 32
like this 1000 of rows.
I have to read this file and create a xml based on the country
those who all belong to same country and city(Singapore and shong ) are to be written in to one file.
then the next country to another file, and so on.
Thanks and Regards
Velu
Anonymous
Not applicable
Author

Hello Velu
Here comes a Java example: (please see the screenshot)
tFileInputDelimited_1=tFileInputDelimited_3:

USA;New work;Elise;36
China;Shenzhen;shong;26
France;Paris;Plegall;27
Britain;London;Alice;23
France;Lyon;Alan;34
China;Beijing;TangYi;22
France;Nantes;Tom;44
China;Beijing;Yitong;20
France;Toulouse;CCarbone;30
Britain;London;Edward;23

tFileOutputDelimited_1=tFileInputDelimited_2;
Hope it helps you!
Best regards
shong
0683p000009MC3s.png 0683p000009MC3x.png 0683p000009MC42.png 0683p000009MBz9.png 0683p000009MC0g.png 0683p000009MC47.png 0683p000009MC1Y.png 0683p000009MBp0.png 0683p000009MC0h.png
Anonymous
Not applicable
Author

Hi Shong,
i tried to create multiple XML file from DB, but end up with one file. when a particular field changed , need to create another file. Please help to create the same.thanks
Anonymous
Not applicable
Author

Did you test shongs's solution?
Looks like this will work and fit you needs (creating different files based on a value in your row).
Setting the (dynamic) filename is made in picture "outschema2.png".
Bye
Volker
_AnonymousUser
Specialist III
Specialist III

Thanks Shong.
I was looking for a comparable solution in Talend (for informatica , similar scenario) and this solution works perfectlt fine for me.