Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am desperately searching for a tool (windows or Linux) with which I can compare two xml files, without spending half a day of configuring the tool. There are a lot of answers already in SO, but those tools either just don't work (e.g. xmldiff which always gets killed), does not work as expected (e.g. ExamDiff) or might work but require a lot of configuring (e.g. WinMerge).

I am looking for a damn simple tool to compare xml content, split into the different attributes etc., if the files does not have newlines. The last tools mentioned above compare the files, and found one difference: a line many kBytes long. This is not what I want.

When I have two filws starting with the following:

<rci_request version="1.1"><set_setting><boot><static>on</static>...
<rci_request version="1.1"><set_setting action="deferred">...

I want the single different elements pointed out, like

<static>on</static>

or

<set_setting action="deferred">

and now the whole line consisting of 42246 characters.

Again, a simple to use tool needed to do the above task.

share|improve this question

closed as off-topic by Tog, Patches, Excellll, Mokubai, Dave M Sep 20 '13 at 20:34

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking product, service, or learning material recommendations are off-topic because they tend to become obsolete quickly. Instead, describe your situation and the specific problem you're trying to solve. Here are a few suggestions on how to properly ask this type of question." – Tog, Patches, Excellll, Mokubai, Dave M
If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers 2

Notepad++ download here should do exactly as you ask.

Quick guide here on using the compare/difference tool.

edit: Apologies, as matan129 stated you need to go to Language -> XML.

share|improve this answer
    
With the information you provided I was unable to compare my two xml files. Both files are handled as monolithic blocks of text, without having parsed them according to xml rules. –  Alex Sep 20 '13 at 7:27
    
@Alex - just go to Language > XML and that will fix the parsing –  matan129 Sep 20 '13 at 7:44
    
No, it does not change the view. Still one block –  Alex Sep 20 '13 at 8:21

One solution is to 'split' the file manually before doing a normal diff (diff, kdiff, whatever) by applying

sed -i 's/>/>\n/g' file.xml

to manually insert newlines. Of course, the splitting can be improved to split at full tags, but this solution is a workaround as there seem to exist no standalone solutions.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.