Merge XML file (to same root)

HI

I am looking for a easy way to merge 2 xml files like the following

file 1: will have a structure like this

<Group GID="TOTO" NAME="TOTO" UNITS="1.0">
               <Property NAME="Id" VALUE="TOTO"/>
               <Property NAME="Currency" VALUE="USD"/>

        <Group GID="ACG" NAME="ACG">
                  <Property NAME="Id" VALUE="ACG"/>
                  <Property NAME="Name" VALUE="ACG"/>

               <Group GID="ACG_1" NAME="ACG_1">
                     <Property NAME="Id" VALUE="ACG_1"/>
                     <Property NAME="Name" VALUE="ACG_1"/>
			<Position POS_SZ="-1" />
                  	<Position POS_SZ="-2" />
                  	<Position POS_SZ="-3" />
                  	<Position POS_SZ="-4" />
               </Group>

               <Group GID="ACG_2" NAME="ACG_2">
                     <Property NAME="Id" VALUE="ACG_2"/>
                     <Property NAME="Name" VALUE="ACG_2"/>
               </Group>
	</Group>
</Group>

file 2: will have a structure like this

<Group GID="TOTO" NAME="TOTO" UNITS="1.0">
               <Property NAME="Id" VALUE="TOTO"/>
               <Property NAME="Currency" VALUE="USD"/>

        <Group GID="ACG" NAME="ACG">
                  <Property NAME="Id" VALUE="ACG"/>
                  <Property NAME="Name" VALUE="ACG"/>

               <Group GID="ACG_1_bis" NAME="ACG_1_bis">
                     <Property NAME="Id" VALUE="ACG_1_bis"/>
                     <Property NAME="Name" VALUE="ACG_1_bis"/>
			<Position POS_SZ="-1" />
                  	<Position POS_SZ="-2" />
                  	<Position POS_SZ="-3" />
                  	<Position POS_SZ="-4" />
               </Group>
	</Group>

        <Group GID="ABC" NAME="ABC">
                     <Property NAME="Id" VALUE="ABC"/>
                     <Property NAME="Name" VALUE="ABC"/>
        </Group>

</Group>

and i would like an output file looking like this

<Group GID="TOTO" NAME="TOTO" UNITS="1.0">
               <Property NAME="Id" VALUE="TOTO"/>
               <Property NAME="Currency" VALUE="USD"/>

        <Group GID="ACG" NAME="ACG">
                  <Property NAME="Id" VALUE="ACG"/>
                  <Property NAME="Name" VALUE="ACG"/>

               <Group GID="ACG_1" NAME="ACG_1">
                     <Property NAME="Id" VALUE="ACG_1"/>
                     <Property NAME="Name" VALUE="ACG_1"/>
			<Position POS_SZ="-1" />
                  	<Position POS_SZ="-2" />
                  	<Position POS_SZ="-3" />
                  	<Position POS_SZ="-4" />
               </Group>

               <Group GID="ACG_1_bis" NAME="ACG_1">
                     <Property NAME="Id" VALUE="ACG_1"/>
                     <Property NAME="Name" VALUE="ACG_1"/>
			<Position POS_SZ="-1" />
                  	<Position POS_SZ="-2" />
                  	<Position POS_SZ="-3" />
                  	<Position POS_SZ="-4" />
               </Group>

               <Group GID="ACG_2" NAME="ACG_2">
                     <Property NAME="Id" VALUE="ACG_2"/>
                     <Property NAME="Name" VALUE="ACG_2"/>
	       </Group>
        </Group>

        <Group GID="ABC" NAME="ABC">
                     <Property NAME="Id" VALUE="ABC"/>
                     <Property NAME="Name" VALUE="ABC"/>
        </Group>

</Group>

any good ideas ?

Post the actual data, warts and all, not a simplified tree. XML is notorious for inspiring solutions that work for our data but not yours...

Hi
I reedit my post to put better data as example

Effectively what you want is to merge the two input documents so that equivalent nodes only appear once in the output document. The best way to do this is to use XSLT. Oliver Becker's merge.xslt stylesheet will probably do what you want.

See Merging two XML Documents.

effectivement cela fonction merci

Google translate gives me 'this function actually thank you'.

I'm not sure what this means.

Could you please post in English?

lol
funny google translator.

it actually mean,
"it is working, thanks" (in french) by Oliver Becker's merge.xslt

for one sec i forgot to wrote in English