About this XML comparison
XML turns up in configuration files, SOAP messages, sitemaps, feeds and office documents. When two versions disagree, an XML diff shows which elements changed and marks the values inside them.
Keep one element per line in both documents for the clearest result.
What changed in this sample
- The name changed from John Doe to Jane Doe and the age from 30 to 31.
- Every address field changed: street, city, state and zip.
- Both phone numbers changed, the email followed the new name, and
activeflipped from true to false.
Tips for comparing XML
- Pretty-print first
- XML on one line is hard to compare. Format both documents with the same indentation, then compare.
- Compare config files
- web.config, pom.xml, AndroidManifest.xml and .csproj files are all XML, and opening them selects XML highlighting.
- Check sitemaps
- Compare two versions of a sitemap.xml to see which URLs were added or removed.
- Mark small value changes
- Use the Characters highlight to see a changed digit in a version number or ID.
How to compare XML online
- Paste the older version into Original and the newer one into Changed, or open a file on each side.
- Check that the syntax menu says XML, then pick split or unified view.
- Step through the changes with the arrows or Alt ↓, and use Settings for options such as ignoring blank lines.
- Save the comparison in your browser, share a link, or download it as a .diff, HTML or PDF.
XML comparison: questions
How do I compare two XML files?
Open or paste one file into each pane. Changed elements and attributes are highlighted, with the exact values that differ marked.
Does attribute order matter?
Yes, because the comparison is textual. Two elements with the same attributes in a different order show as changed.
Does it validate against a schema?
No. It compares the text only.