[resolved] How to insert a xml node to an existing xml file
Hi there, I am new to Talend. I have a task to merge two xml file: - Xml File #1 <root> <row> <column1>test</column1> <column2>test</column2> <column3>test</column3> </row> <row1> <column1>test</column1> <column2>test</column2> <column3>test</column3> </row1> ... </root>
-XML File #2 <another_root> <header></header> <content> <element1> <subelement1></subelement1> <subelement2></subelement2> </element1> <element2> <subelement1></subelement1> <subelement2></subelement2> </element2> ... </content> </another_root> so what I want to achieve is to grab "root" element from XML file #1 and insert it to underneath of element2. In other words.....
<another_root> <header></header> <content> <element1> <subelement1></subelement1> <subelement2></subelement2> </element1> <element2> <subelement1></subelement1> <subelement2></subelement2> </element2> ... <--- root element of xml file #1 goes here </content> </another_root>
I researched all xml related components and could not figure out how to do this. Please let me how it can be resolved. Thank you in advance.