Xmldiff is an OCaml library to compute diffs on XML trees. It also provides a Js_of_ocaml module to apply patches to the DOM in a browser.

Download

Xmldiff is hosted on Framagit.

Releases
  • 0.7.0 [2021-12-08]:
    • use dune to build and install,
    • rename package xmldiff.js to xmldiff_js.
  • 0.6.0 [2021-05-10]:
    • upgrade to ocaml 4.12.0,
    • fix: detection of xmlm version,
    • Xmldiff_js: add optional ?doc parameter to functions to specify the root document (default is Dom_html.document).
  • 0.5.0 [2014-10-21]:
    • fix implementation of XyDiff algorithm,
    • when applying patch to DOM, compare only local names,
    • xmldiff JS lib does not embed the Xmldiff module, as package xmldiff.js already depends on package xmldiff,
    • add more tests.
  • 0.4.0 [2014-10-09]:
    • Fix implementation of XyDiff algorithm,
    • Add more tests.
  • 0.3.0 [2014-09-24]:
    • Change the algorithm, now use Gregory Cobena's Xydiff algorithm,
    • Change of the patch operation set, now includes Move and Insert operation can be as `FirstChild of a node or `After a node.
    • If js_of_ocaml is installed, a xmldiff.js package is installed. The Xmldiff_js module contains a function to apply a patch to the DOM.
  • 0.2 [2014-09-08]:
    • Fix #2: error when comparing <foo/> to <foo><bar/></foo>,
    • use polymorphic variants not to require -rectypes flag,
    • compile and install xmldiff.cmti,
    • new parameter ~cut for Xmldiff.diff to quicken the comparison by lowering precision under some tags.
  • 0.1 [2014-03-03]: Initial release.
Installation

To be installed, Xmldiff requires:

To compile and install:

This will install the xmldiff package (and eventually the xmldiff_js).

You can also install with Opam:

opam install xmldiff xmldiff_js
Documentation

Reference documentation is here.

License

Xmldiff is released under the LGPL v3.

Author and contact

Maxence Guesdon <Maxence 'DOT' Guesdon 'AT' inria 'DOT' fr>