XMLDiff 1

  • Post category:IT
  • Post comments:0 commentaire
  • Post last modified:18 novembre 2018
  • Temps de lecture :8 min de lecture

This is the first release of xmldiff, now bundled with libxmldiff. You should really use the new version. The one below is only kept for historical purpose.



Xerces Version (xmldiff 1.x)

Download the source (C++, VS & GCC, need Xerces-C)
Download the win32 binaries

Usefull other software

Download the XML Diff Tree View program (Win32 binary only)
Download the GUI launcher binary to have a basic GUI support

What ?

XMLDiff aims at providing efficient diff on XML files.

Features are :

  • Detection of modified items, added items, removed items
  • Not sensitive to item position changes (based on a id).
  • Designed to support large XML files (about 50 Mo). For larger files, treat these files with XML Pre Diff Tool (see below) would be a good idea.
  • Simple to use


How expansive is it ?

These programs are released under the GPL license. It allows you to use the program at no charge, and freely adapt the provided source code to your needs.


How to use ?

The program is splitted in three parts :

  • xmldiff : is the main program, in command line.
  • launcher / xmldiff.xml / xmldiff.bat : is a simple GUI frontend.
  • XMLDiffTreeView : is a simple XML Tree navigator, which uses the diff:status calculated by xmldiff, and which is also optimized for large files.



XMLDiff diffs two files, and output a file with exactly the same structure (unlike other xml diffing utilities), and containing an extra diff:status attribute.

The meaning of this diff:status argument is :

  • added : the element has been added.
  • removed : the element has been removed.
  • modified : either an argument or the text has been modified, the values will be outputted with the ‘|’ separator : “before|after”.
  • below : the element itself was not modified, but a child item was.



Screenshot of the UI :
Screenshot of the UI


Options are :

  • Avant / Apres / Sortie : Before / After / Output files.
  • –ids / “Ids” : items to be taken for id. Id is used to sort items, nd not be sensitive to the order of elements. Attributes should be preceded by ‘@’. Nodes should be used carefully, as this as significant impacts over performance.
  • –before-value no / “Ne pas indiquer les valeurs précédentes” : don’t output “before|after” values. The last value available is used.
  • –clean-text no / “Ne pas supprimer les blancs” : blank spaces, carriage returns,… are removed. Unchecking this option will drastically improve the performances, but will show false differences (ex : when an element is added, a blank text element is often added too…)
  • –tag-childs no / “Ne pas marquer les fils” : Checking this option will prevent xmldiff to tag child of added/removed nodes with the same status.
  • –pretty-print no / “Ne pas formater le xml produit” : Checking this option will prevent xmldiff to pretty print the output. Use this with –clean-text no / “Ne pas supprimer les blancs”.

This diff:status attribute is very easy to handle in XSL Stylesheet, and you can make the XSL for the better display of your xml document. You can also use the generic XMLDiffTreeNav below :



This tool provides an easy browsing of xml diff files : icons are representing the diff status : ‘+’ means ‘added’, ‘-‘ means ‘removed’, ‘?’ means that there is a modification in the child items, and a yellow block show an element with a modification. In the modified item, the values before and after are provided : “before|after”.

A button in the toolbar can be used to show only modified items : unchanged items will be hidden. This is very usefull for files where there are only few differences.


Screenshot of XMLDiffTreeView :
Screenshot of the UI


Laisser un commentaire

Ce site utilise Akismet pour réduire les indésirables. En savoir plus sur comment les données de vos commentaires sont utilisées.