views:

809

answers:

8

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.

+3  A: 

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

epotter
I agree I am using KDiff3 at the moment, however a tool specifically for XML that could go down to the element level would be terrific.
Russell
If a child of a node has changed, then surely the node itself has materially changed. I don't think I quite follow what a tool specific to XML would do in such a case that would be different from diff (pardon the pun).
Jarret Hardie
I was thinking from this perspective: the way KDiff does a hierarchical diff of directories, a hierarchical diff of elements could also work. So if an element has changed, then I agree, the parent elements should also be flagged as having changed.
Russell
Ah, I get it now, many thanks. You're looking for a diff tool that can report a change in a line of text that actually hasn't itself changed, but for which a "nested" line of text has changed. Gotcha. That *would* be very useful. Apologies for not cottoning-on earlier.
Jarret Hardie
No probs, just thought it would already exist :)
Russell
everyone realizes that in xml the child nodes are not guaranteed to be in any specific order, so any "tool" that reported that something was not in the same order from one file to the next really won't be a real xml compliant tool
fuzzy lollipop
Yeah that makes this more complicated, however there may be ways to help the diff tool, eg. attributes may indicate which elements are the same in the two documents etc. Good point though :)
Russell
+2  A: 

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

Open Source XML Diff written in Java

Added links:

cxfx
I am having trouble finding any links to the software in the link you mentioned.
Russell
Yeah, me too! Might need to Google around a bit...
cxfx
+1  A: 

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

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

S.Mark
Thanks S.Mark, as I mentioned to epotter, I already use KDiff3 for general file diffs, however I would really prefer an XML specific diff utility if it is available (if not, I will start up an open-source one :) )
Russell
>> `(if not, I will start up an open-source one :)` Wow, wonderful! will looks forward to it, please drop link somewhere here If its starts.
S.Mark
Ok, Will do :)-
Russell
+1  A: 

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.

Jarret Hardie
+1  A: 

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

Lin Yu Tang
A: 

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

AP
A: 

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

JackD
A: 

I am searching a free diff tool with support of native syntax and markup for XAML, but failed to find one. I like Altova's DiffDog but it's paid. CodeCompare is an useful tool. It has some worth with its integration into VisualStudio and usage of native editors. It's a perfect solution for XML! However, it does not support XAML editors. Who can recommend a diff tool for XAML?

Ahikam
Hi @Ahikam the design of stackoverflow means you would be more likely to get an answer to your question by asking a new question. You can reference this question and explain why it does not provide the answer. :)
Russell