One Star

Merging two xml files

Hi,
I am in need to merge some xml files to a single output xml file.The final output contains all the tags of child files.Can u plz tell me how to do this using talend?
Regards,
Nivaz
3 REPLIES
Community Manager

Re: Merging two xml files

Hello Nivaz
I think you can try the 'append the source xml file' feature on tAdvanceFileOutputXML component.
Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Merging two xml files

Hi Shong,
Thanks for the reply.tAdvanceFileOutputXML can be the output component.How can I provide the input files for tAdvanceFileOutputXML?
PLease reply.
REgards,
Nivaz
One Star

Re: Merging two xml files

If you want to merge two XML files using Visual C#.net that Dataset concept will be used to do this. You can try some code also with the help of XML namespace and XMLnode.
System.Xml.XmlDocument oDocFirst = new XmlDocument();
oDocFirst.Load("d:\\xmlfiles\\parent.xml");

System.Xml.XmlDocument oDocSecond = new XmlDocument();
oDocSecond.Load("d:\\xmlfiles\\child.xml");
If you want to merge them on a simple way than you can try tAdvanceFileOutputXML to merge your two XML files where you have to specify parent file and the child file.