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: 
idembel2
Creator
Creator

HOW TO MERGE 2 XML IN A SINGLE FILE

Hi all,

I have 2 Input XML files which look like bellow:

 

File1 (file also in attach)

0683p000009LxgL.png

 

File2 (file also in attach)
0683p000009Lx35.png

 

 

 

 

 

 

 

 

Output file desired (file also in attach)
0683p000009LxgW.png

 

 

 

 

 

 

 

 

Thank you for help

 

 

 

Labels (5)
1 Solution

Accepted Solutions
idembel2
Creator
Creator
Author

Hi All,

I found finally solution to my issue, 2 ways to solve it

 

Solution 1 :

Create 1 first output with all good and with only one iteration.

After that make a mapping in a tmap to generate a second iteration that will be write in first output with option write after  

 

Solution 2 :

Use component tFileOutputMSXML to make all loop

 

Thanks,

View solution in original post

25 Replies
manodwhb
Champion II
Champion II

@mbocquet,if the Name would be same in bothe XML's.then implemnt in the below way by join on Name

0683p000009LxgX.png

idembel2
Creator
Creator
Author

Hi,
How to do it please, I have this idea but i try to map both file in a txmlMAp i got error
Thanks
manodwhb
Champion II
Champion II

Hi,please find below.i was doing join on skuid.

0683p000009Lx10.png0683p000009LxNj.png

idembel2
Creator
Creator
Author

Hi Manohar B,

That is exactly what i try to do, mapping both xml file to generate output XML File.

 

Find bellow my config of tFileInputXML component0683p000009LxWN.png

 

 

 

 

 

 

 

 

 

Find bellow my config of tXMLMap component
0683p000009Lxi7.png

 

 

 

 

 

 

 

 

 

 

But my output file is blank

 

Thanks,

 

manodwhb
Champion II
Champion II

@mbocquet,can you able to provide smaple source file?

idembel2
Creator
Creator
Author

Hi,

Already provided in attached of my first post

Check it please

 

manodwhb
Champion II
Champion II

@mbocquet,what is the data type for "creationTime" from second file?

idembel2
Creator
Creator
Author

It is currentDate that i put in global variable.

Don't worry about it, i put all field in string

 

 

manodwhb
Champion II
Champion II

@mbocquet,it was not getting values when i tick GetNodes in Basic settings>>Mapping of tFileInputXML.

 

so can you uncheck GetNodes in both tFileInputXML's and check?