Comparing xml files
Are there any free Xml Diff/Merge tools available? - Stack Overflow
XML files comparison / diff?
Good free .xml compare software?
Videos
Hello, is there a free tool for xml files comparison? I need to compare two files to check out is there any differences in the new one.
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\.

See also my feature comparison table.
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.

I've got a few XML files that are a couple thousand lines long I need to compare and see which values in file A are missing from file B.
Does anyone have an efficient way to diff these? They're not formatted the same at all, so normal text diff programs won't work. I just need to compare which "<value203>...</value203>" aren't in the one file.
One approach would be to first turn both XML files into Canonical XML, and compare the results using diff. For example, xmllint can be used to canonicalize XML.
$ xmllint --c14n one.xml > 1.xml
$ xmllint --c14n two.xml > 2.xml
$ diff 1.xml 2.xml
Or as a one-liner.
$ diff <(xmllint --c14n one.xml) <(xmllint --c14n two.xml)
Jukka's answer did not work for me, but it did point to Canonical XML. Neither --c14n nor --c14n11 sorted the attributes, but i did find the --exc-c14n switch did sort the attributes. --exc-c14n is not listed in the man page, but described on the command line as "W3C exclusive canonical format".
$ xmllint --exc-c14n one.xml > 1.xml
$ xmllint --exc-c14n two.xml > 2.xml
$ diff 1.xml 2.xml
$ xmllint | grep c14
--c14n : save in W3C canonical format v1.0 (with comments)
--c14n11 : save in W3C canonical format v1.1 (with comments)
--exc-c14n : save in W3C exclusive canonical format (with comments)
$ rpm -qf /usr/bin/xmllint
libxml2-2.7.6-14.el6.x86_64
libxml2-2.7.6-14.el6.i686
$ cat /etc/system-release
CentOS release 6.5 (Final)
Warning --exc-c14n strips out the xml header whereas the --c14n prepends the xml header if not there.