Metadata-Version: 2.0
Name: xmldiff
Version: 2.0b1
Summary: Creates diffs of XML files
Home-page: https://github.com/regebro/xmldiff2
Author: Lennart Regebro
Author-email: lregebro@shoobx.com
License: MIT
Description-Content-Type: UNKNOWN
Keywords: xml html diff
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Topic :: Text Processing :: Markup :: XML
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: License :: OSI Approved :: MIT License
Requires-Dist: lxml (>=3.1.0)
Requires-Dist: setuptools
Requires-Dist: six

xmldiff
========

.. image:: https://travis-ci.org/regebro/xmldiff2.svg?branch=master

.. image:: https://coveralls.io/repos/github/regebro/xmldiff2/badge.svg

xmldiff is a library and a command line utility for making diffs out of
XML.

xmldiff 2.0 is a complete, ground up pure-Python rewrite of xmldiff 1.x.
xmldiff 2.x had various problems, mainly that the code is complex and
unpythonic, making it hard to maintain and fix bugs, there is also an
infinite loop in certain cases, and the c implementation leaks memory,
as well as being hard to use as a library.

xmldiff 2.0 is currently significantly slower than xmldiff 2.x, but this may
change in the future. Currently we make no effort to make xmldiff 2.0 fast,
we concentrate on making it correct and usable.

xmldiff aims to have 100% test coverage.
Python 2.7 support will be dropped soon.

The diff algorithm is based on "`Change Detection in Hierarchically Structured Information
<http://ilpubs.stanford.edu/115/1/1995-46.pdf>`_",
and the text diff is using Googles diff_match_patch algorithm.

Contributors
------------

 * Lennart Regebro, lregebro@shoobx.com (main author)

 * Stephan Richter, srichter@shoobx.com

Quick usage
-----------

>From the commandline::

  $ xmldiff file1.xml file2.xml

As a library::

  from lxml import etree
  from xmldiff import main, formatting

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

  print(diff)

There is also a method ``diff_trees()`` that take two lxml trees, and
a method ``diff_texts()`` that will take strings containing XML.


Changes
=======

2.0b1 (2018-09-03)
------------------

- A complete, bottom-up, pure-python rewrite

- New output formats:

  - A list of actions (similar but not compatible with the old format)

  - XML with changes marked though tags and attributes

  - RML aware XML where tags containing text are semantically diffed, useful
    for human output such as converting to HTML or PDF


