By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,290 Members | 1,426 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,290 IT Pros & Developers. It's quick & easy.

XML Merge/Diff tool?

P: n/a
Is there a tool that will merge XML documents? We also need the reverse, we
need to be able to create a Diff of two documents. What we're trying to do
is just store differences of documents at different levels of hierarchy in
our configuration store.

As an example, lets say at a certain hierarchy in our configuration store is
the following document:

<grid bgColor="Red" fgColor="Green" Width="200" Height="100">
<font name="Arial" size="12" style="Italic"/>
</grid>

And at a lower (derived) level we want to store the document:

<grid bgColor="Red" fgColor="Green" Width="200" Height="200">
<font name="Arial" size="20" style="Italic"/>
</grid>

We only want to store the diff at this lower level which is:

<grid Height="200">
<font size="20"/>
</grid>

Of course when someone asks for this bit of configuration data at this lower
level we need to merge the two documents together (lower levels override
higher levels) to get:

<grid bgColor="Red" fgColor="Green" Width="200" Height="200">
<font name="Arial" size="20" style="Italic"/>
</grid>

Elements which hold collections (arrays) prove a bit more difficult. Does
anyone know of a tool that exists which will do both the 'diff' and 'merge'?

--
Thanks,
Nick
Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
nickdu wrote:
Is there a tool that will merge XML documents? We also need the
reverse, we need to be able to create a Diff of two documents. What
we're trying to do is just store differences of documents at
different levels of hierarchy in our configuration store.

As an example, lets say at a certain hierarchy in our configuration
store is the following document:

<grid bgColor="Red" fgColor="Green" Width="200" Height="100">
<font name="Arial" size="12" style="Italic"/>
</grid>

And at a lower (derived) level we want to store the document:

<grid bgColor="Red" fgColor="Green" Width="200" Height="200">
<font name="Arial" size="20" style="Italic"/>
</grid>

We only want to store the diff at this lower level which is:

<grid Height="200">
<font size="20"/>
</grid>

Of course when someone asks for this bit of configuration data at
this lower level we need to merge the two documents together (lower
levels override higher levels) to get:

<grid bgColor="Red" fgColor="Green" Width="200" Height="200">
<font name="Arial" size="20" style="Italic"/>
</grid>

Elements which hold collections (arrays) prove a bit more difficult.
Does anyone know of a tool that exists which will do both the 'diff'
and 'merge'?


Microsoft offers XmlDiff at http://www.gotdotnet.com/team/xmltools/.
I'm not aware of an XML merge tool.

Cheers,
--
http://www.joergjooss.de
mailto:ne********@joergjooss.de
Nov 18 '05 #2

P: n/a

Try the Exchanger XML Professional product from
http://www.exchangerxml.com - this contains an XML Diff & Merge tool
(and a host of other features that may interest you!). 30-day free
trial available.
--
Cladonia
------------------------------------------------------------------------
Cladonia's Profile: http://www.hightechtalks.com/m350
View this thread: http://www.hightechtalks.com/t2289393

Nov 24 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.