I'm actually planning on the best way to merge xml data from within the SQL database.
I have a table that contains an xml datatype. Inside it are xml's with similar schemas. I wanted to merge, let's say, two xmls and they both contain a <Custom></Custom>
root on both ends.
What is the best way to do this?
First xml:
<Custom>
<Data1>
<ID>23423</ID>
<Row1>value</Row1>
</Data1>
<Data1>
<ID>57568</ID>
<Row1>value</Row1>
</Data1>
<Data1>
<ID>56756</ID>
<Row1>value</Row1>
</Data1>
</Custom>
Second xml:
<Custom>
<Data1>
<ID>6575</ID>
<Row1>value</Row1>
</Data1>
<Data1>
<ID>8345</ID>
<Row1>value</Row1>
</Data1>
<Data1>
<ID>5666</ID>
<Row1>value</Row1>
</Data1>
</Custom>
Please don't mind the ID's, the actual data is in GUID so merging won't be as difficult.