473,657 Members | 2,567 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML Merge/Diff tool?

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
2 2295
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.d e
Nov 18 '05 #2

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3672
by: Guillaume Lahitette | last post by:
Hello everyone, I am looking for a lightweight Java Applet to diff and merge two text files. The functionality would be a subset of what WinMerge (http://winmerge.sourceforge.net) offers: - diff 2 text files - merge (in both directions) - color coding to highlight differences I found some Java diff tools but they were all command line. And my
2
842
by: MAF | last post by:
Is there a quick way to merge two XML files example A <TestNode> <Data>123</Data> </TestNode> <TestNode> <Data>123</Data> <Data>222</Data>
9
6508
by: Ching-Lung | last post by:
Hi all, I try to create a tool to check the delta (diff) of 2 binaries and create the delta binary. I use binary formatter (serialization) to create the delta binary. It works fine but the delta binary is pretty huge in size. I have 1 byte file and 2 bytes file, the delta should be 1 byte but somehow it turns out to be 249 bytes using binary formatter. I guess serialization has some other things added to the delta file.
4
4950
by: Andreas Kasparek | last post by:
Hola! I'm preparing my master thesis about a XML Merge Tool implementation and was wondering if there is any open standard for XML diff regarding topics like: - is a diff result computed on the ordered or unordered xml node tree of the compared documents? - what identifiers/criteria should be used by default to match elements of the same type in different documents? - should a diff tool consider move operations or only insert/delete
2
2475
by: # Cyrille37 # | last post by:
Hello, I've to merge a peace of xml in another xml document. Here is an example: The doc: <layout> <win x="0"> <visible>false</visible> <text>coucou</text>
8
1865
by: ilikesluts | last post by:
Hi Group, I'm new to XML, here is my question: Would it be possible to write an algorithm that takes in two XML documents with the only condition being that they have the same root element? If it is possible what would be the best technology to implement the solution (XMLDom, XSLT...)? How hard would the solution be?
7
21900
by: Steve Hershoff | last post by:
Thanks to this newsgroup I've been pointed to Microsoft's XML Diff & Patch utilities. I've been reading about how I can use the tools to generate a diffgram between two XML documents, and how the XML Patch utility can (for example) bring document A in line with document B. Very cool. However, I was wondering if there's any way I can use the diffgram to generate something else; a third type of document that highlights the differences...
1
3450
by: earthwormgaz | last post by:
Is there anything in Boost (or elsewhere if needs be) that will allow me to diff/merge files? I am writing out a data file, and I want to merge it with an existing on if its there.
1
3967
by: Andy Fish | last post by:
hi, I am looking for a library (i.e. not a standalone GUI program) that can do diff and merge of HTML or XML, preferably in C# or at least that can be called from C# anyone know of such a thing TIA
0
8397
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4158
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4315
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2731
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1957
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1620
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.