I have two xml files (A.xml and B.xml):
<Root>
<A>
<name>number</name>
<value>8</value>
</A>
</Root>
and
<Root>
<A>
<name>number</name>
<value>15</value>
</A>
</Root>
And I should to get the result XML:
<Root>
<A>
<name>number</name>
<value>8</value>
</A>
<A>
<name>number</name>
<value>15</value>
</A>
</Root>
I have my own solution is to get the object from XML, put it into a list and then get XML from this list. Maybe there is a better solution (using JAX-B)?