Compare XML

XML diff / merge

XMLSpy Differencing Features:

  • Comparing XML files in Text View
  • Comparing XML files in Grid View
  • XML-aware diff/merge options
  • Bi-directional merging of differences
  • Color-coded differences & informative icons
  • Comparing directories

Download Trial

Comparing XML

XMLSpy includes a visual XML differencing utility that allows developers to easily compare and merge XML documents and directories in an intelligent, XML-aware manner.

The XMLSpy XML differencing engine is completely customizable. For example, you can specify if entities should be resolved, if namespace prefixes, whitespace, CDATA, processing instructions, comments, or the ordering of attributes/child elements should be ignored or not, and how to visualize differences. In addition, you can merge the textual differences and differences in XML between two files as you are comparing them.

The XML-aware capabilities of this diff/merge utility make it the best tool in many important scenarios:

  • Suppose an XML developer changes the default namespace prefix in an XML instance document. This change does not materially affect the contents of the XML document, and while a conventional software differencing utility would report that virtually every line of code in the XML instance document has changed, the XMLSpy XML differencing utility will deal with this change appropriately.
  • The order of XML attributes is irrelevant because XML processors do not consider the sequence that attributes appear in a particular element. XMLSpy accounts for this and intelligently ignores the attribute order, but a conventional differencing utility cannot and would therefore report every change in attribute ordering.
  • There are differences in XML when the ordering of child elements is irrelevant; for example, if a schema defines a relationship using an "all" compositor, the ordering of child elements is immaterial. The XMLSpy XML differencing utility can be set to overlook irrelevant differences, whereas a conventional differencing utility cannot.
  • An XML processor resolves entity references at run-time, so, although an XML file may not have changed, the entity definitions could have, resulting in a different XML file. A conventional software differencing utility would not pick up on this, but XMLSpy does.

Comparing Directories

XMLSpy can also compare entire directories and generate an overall report detailing their differences, allowing a developer to visually ascertain which files are new, deleted, or modified. Upon clicking on a particular entry, XMLSpy will open the two associated files and compare them visually.

XML-aware comparision options

Next Steps