Are there any free Xml Diff/Merge tools available?

XmlMergeDiff

Xml Problem Overview


I have several config files in my .net applications which I would like to merge application settings elements etc.

I was about to begin doing it manually as I usually do, however thought there must be an XML diff GUI tool available somewhere.

The tool would be able to go to the element level to compare and display the differences etc.

However Google gave no substantive free tool results and no hints for anything of value.

Is such a tool available? That is very useful? For free?

Thanks in advance. :)

Edit:

Here is a bit of clarification of the functionality that would turn my error-prone, tedious manual job into a 1-minute simpler task (and potential to automate):

In KDiff3, you can do a diff/merge of entire directories. There is a hierarchical diff which is very accurate, user-friendly and clear. I was interested in finding a similar solution, however instead of directory hierarchy, an XML element hierarchy.

If there is no such open source software, I am considering creating one on CodePlex to provide this functionality.

Xml Solutions


Solution 1 - Xml

Have a look at File comparison tools, from which I am using WinMerge. It has an ability to compare XML documents (you may wish to enable DisplayXMLFiles prefilter for v2.14.0 or PrettifyXML for v2.16.x).

DisplayXMLFiles.dll - This plugin pretty-prints XML files nicely by inserting tabs and line breaks. This is useful for XML files that do not have line returns in convenient locations.

Note for v2.16.x

The plugin PrettifyXML is supplied with the software package. It can be activated as following:

  • Make sure that Plugins → Plugin Settings → Enable plugins is enabled.
  • Then use either File → Recompare As → Prettify XML or Plugins → Scripts → Prettify XML

For those who wish to play with deprecated DisplayXMLFiles, he needs to download e.g. winmerge-2.16.14-full-src.7z and copy Plugins\dlls\X64\DisplayXMLFiles.dll to WinMerge\MergePlugins\.

WinMerge in action

See also my feature comparison table.

Solution 2 - Xml

I wrote and released a Windows application that specifically solves the problem of comparing and merging XML files.

Project: Merge can perform two and three way comparisons and merges of any XML file (where two of the files are considered to be independent revisions of a common base file). You can instruct it to identify elements within the input files by attribute values, or the content of child elements, among other things.

It is fully controllable via the command line and can also generate text reports containing the differences between the files.

Project: Merge merging three XML files

Solution 3 - Xml

There are a few Java-based XML diff and merge tools listed here:

Open Source XML Diff written in Java

Added links:

Solution 4 - Xml

KDiff3 is not XML specific, but it is free. It does a nice job of comparing and merging text files.

Solution 5 - Xml

While this is not a GUI tool, my quick tests indicated that diffxml has some promise. The author appears to have thought about the complexities of representing diffs for nested elements in a standardized way (his DUL - Delta Update Language specification).

Installing and running his tools, I can say that the raw text output is quite clear and concise. It doesn't offer the same degree of immediate apprehension as a GUI tool, but given that the output is standardized as DUL, perhaps you would be able to take that and build a tool to generate a visual representation. I'd certainly love to see one.

The author's "links" section does reference a few other XML differencing tools, but as you mentioned in your post, they're all proprietary.

Solution 6 - Xml

Pretty Diff tool was created with XML in mind. Just ensure you click the option for "markup".

http://prettydiff.com/

Solution 7 - Xml

I use TortoiseMerge, which is included in TortoiseSVN program

And we have talked about File Diff tools in this thread, not dedicated to XML though

https://stackoverflow.com/questions/1830962/file-differencing-software-on-windows

Solution 8 - Xml

A7Soft provide XML comparison tools freeware and shareware:

http://www.a7soft.com

Solution 9 - Xml

Altova's DiffDog has free 30-day trial and should do what you're looking for:

http://www.altova.com/diffdog/diff-merge-tool.html

Solution 10 - Xml

This is a diff engine for java developers, but it comes with a demo interface - you might be able to use it: https://community.emc.com/docs/DOC-5042

Solution 11 - Xml

I recommend you to use CodeCompare tool. It supports native highlighting of XML-data and it can be a good solution for your task.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionRussellView Question on Stackoverflow
Solution 1 - Xmldma_kView Answer on Stackoverflow
Solution 2 - Xmluser420442View Answer on Stackoverflow
Solution 3 - XmlChris FulstowView Answer on Stackoverflow
Solution 4 - XmlepotterView Answer on Stackoverflow
Solution 5 - XmlJarret HardieView Answer on Stackoverflow
Solution 6 - XmlaustincheneyView Answer on Stackoverflow
Solution 7 - XmlYOUView Answer on Stackoverflow
Solution 8 - XmlAndrew LapickView Answer on Stackoverflow
Solution 9 - XmlLin Yu TangView Answer on Stackoverflow
Solution 10 - XmlAP.View Answer on Stackoverflow
Solution 11 - XmlJackDView Answer on Stackoverflow