$npx skillfedfor your agent

xmldiff

Creates diffs of XML files

Worth itPyPI XMLReleased Jun 2026374.3K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — xmldiff-3.0-py3-none-any.whl
v3.0 · released 2026-06-11 · Python >=3.8 · 1 runtime deps: lxml

Yes. xmldiff solves a real problem—traditional diffs are unreadable for hierarchical data—and does so with low install friction, active maintenance, permissive licensing, and no known vulnerabilities. Use it if you need to compare XML files or trees in a way that makes sense to humans; skip it if you only need line-by-line text diffs.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires lxml, which has compiled C dependencies; ensure your environment can install it (may need system libraries on some platforms).
  • Low friction: single pure-Python dependency (lxml), actively maintained with a release 64 days ago, and supported across Python 3.8 through 3.15 including PyPy.

License · maintenance · safety

MIT (permissive) — MIT license is permissive; you can use, modify, and distribute xmldiff with minimal restrictions, making it suitable for both open-source and proprietary projects.

last release 2026-06-11 (64 days) · last repo commit 2026-06-11 · 229 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 374,264 downloads/mo, #7,147 on PyPI

Verify before relying

from lxml import etree
from xmldiff import main, formatting

diff = main.diff_files('file1.xml', 'file2.xml',
                       formatter=formatting.XMLFormatter())
  • Performance characteristics relative to other XML diff tools or to the earlier 0.6/1.x versions.
  • Stability of the output format across future releases (documentation notes rapid development and no version-to-version guarantees).
Same gist for agents: .md · .json

What it is and what it does

xmldiff is a Python library and command-line tool that detects and reports changes between two XML documents in a way that respects XML's hierarchical structure. Unlike a line-by-line text diff, xmldiff understands that XML is tree-structured data and produces diffs that are meaningful to humans—useful when XML is used as a format for hierarchical data that will be rendered or displayed. The library offers multiple interfaces: a command-line tool for quick comparisons, a Python API with methods like diff_files(), diff_trees(), and diff_texts() for programmatic use, and support for different output formats including one that marks up differences directly in the XML.

The package is a complete rewrite from earlier versions, focusing on correctness and usability over raw speed. It handles large files without memory leaks and provides a cleaner, more Pythonic API. It depends only on lxml for XML parsing and is actively maintained, supporting Python 3.8 through 3.15.

Use it for

  • Compare XML configuration files to see what settings have changed between versions or deployments.
  • Generate human-readable diffs of XML-based document formats (e.g., office documents, SVG) for review or audit trails.
  • Detect structural changes in XML data feeds or API responses for testing or monitoring purposes.
  • Patch XML files using diffs produced by xmldiff via the xmlpatch command.
  • Integrate XML change detection into CI/CD pipelines or version control workflows.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

xmldiff solves a real problem—traditional diffs are unreadable for hierarchical data—and does so with low install friction, active maintenance, permissive licensing, and no known vulnerabilities. Use it if you need to compare XML files or trees in a way that makes sense to humans; skip it if you only need line-by-line text diffs.

Install

xmldiff on PyPI

Before you install

Low friction: single pure-Python dependency (lxml), actively maintained with a release 64 days ago, and supported across Python 3.8 through 3.15 including PyPy.

Requires lxml, which has compiled C dependencies; ensure your environment can install it (may need system libraries on some platforms).

License in practice

MIT license is permissive; you can use, modify, and distribute xmldiff with minimal restrictions, making it suitable for both open-source and proprietary projects.

Quickstart

from lxml import etree
from xmldiff import main, formatting

diff = main.diff_files('file1.xml', 'file2.xml',
                       formatter=formatting.XMLFormatter())

Verify before relying

  • Performance characteristics relative to other XML diff tools or to the earlier 0.6/1.x versions.
  • Stability of the output format across future releases (documentation notes rapid development and no version-to-version guarantees).

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.8
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
lxml
MaintenanceActively maintained 64 days since the last release
Last repo commit
First released
Downloads374,264 / month, #7,147 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: End Users/DesktopLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Programming Language :: Python :: Implementation :: PyPyTopic :: Text Processing :: Markup :: XML

Evidence: xmldiff-3.0-py3-none-any.whl

Tags

Capabilities
xml diff comparisonhierarchical xml changesxml file differdetect xml changesxml patch toolhuman readable xml diffxml tree comparison
Topics
xml-toolsdiff-utilities
PyPI keywords
diffhtmlxml

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “xml diff comparison”

  • xmldiffxmldiff compares two XML files or trees and produces a human-readable…
  • pycoberturaParses Cobertura code coverage reports and compares two reports to…
  • zssComputes the edit distance between two tree structures using the…

Give your agent the search over MCP, or paste the wish link into any chat.

More XML packages

beautifulsoup4 Worth it
PyPI · Python Modules · released Jun 2026

Beautiful Soup parses HTML and XML documents into a navigable tree, providing Pythonic methods to search, iterate, and modify the parsed content.

Install it if you need to parse or extract data from markup documents.

MITpure Python · 3.7.0+
432.1Mdownloads / mo
lxml Worth it
PyPI · Python Modules · released May 2026

lxml provides Python bindings to libxml2 and libxslt, enabling parsing, validation, and transformation of XML and HTML documents through an ElementTree-compatible API with support for XPath, XSLT, and schema validation.

Install it if you need robust XML/HTML parsing, validation, or transformation; avoid it only if you must stay pure-Python and can accept slower performance.

permissive licensecompiled wheel · 3.8+
416.8Mdownloads / mo
defusedxml Worth it
PyPI · XML · released Mar 2021

Defusedxml hardens Python's standard XML libraries against XML bomb attacks and entity expansion exploits by providing drop-in replacements that disable dangerous parsing features by default.

Install it if your application parses any XML from untrusted sources.

permissive licensepure Pythondormant
241.2Mdownloads / mo
docutils With conditions
PyPI · Software Development · released May 2026

Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.

BSD-3-Clausepure Python · 3.9+
225.6Mdownloads / mo
xmltodict Worth it
PyPI · XML · released Feb 2026

Converts XML to Python dictionaries and back, treating XML parsing and generation like working with JSON.

MITpure Python · 3.9+
127.1Mdownloads / mo
Sphinx Worth it
PyPI · Software Development · released Dec 2025

Sphinx generates professional documentation from reStructuredText source files, producing HTML, PDF, EPUB, and other formats with automatic cross-references, code highlighting, and hierarchical navigation.

BSD-2-Clausepure Python · 3.12+
91.8Mdownloads / mo

See also datadiff · diff-parser · et-xmlfile · redlines · patch · xmlunittest · recursive-diff · diff-match-patch · dictdiffer · fast-diff-match-patch