Dear Stefan,
In the examples you had used, it will be just appending.
To make it clear, let me illustrate with another.
1) Input1.xml
<?xml version="1.0"?>
<app name="testapp" lifetime="900">
<mainmenu>
<menu id="1" caption="test"/>
<menu id="2" caption="another test"/>
</mainmenu>
<forms>
<testform autosize="1"/>
<testform2 autosize="0"/>
</forms>
</app>
2) Input2.xml
<?xml version="1.0" encoding="UTF-8"?>
<app lifetime="100">
<mainmenu>
<menu id="2" caption="my test"/>
<menu id="3" caption="my menu"/>
</mainmenu>
<forms>
<testform2 autosize="1"/>
</forms>
</app>
3) Result.xml should be
<?xml version="1.0" encoding="UTF-8"?>
<app name="testapp" lifetime="100">
<mainmenu>
<menu id="1" caption="test"/>
<menu id="2" caption="my test"/>
<menu id="3" caption="my menu"/>
</mainmenu>
<forms>
<testform autosize="1"/>
<testform2 autosize="1"/>
</forms>
</app>
WHat I request is an answer, not specific to above example, but generic. I
mean, without hardcoding any tag names, I would like to generate it
dynamically. Also, it is possible that number of input XMLs to be merged may
not be two.
Hence to put it briefly, generate an XML file, by merging n different XML
files, where 2<= n <= 25
Please help, thanks
Warmest regards,
Ravi