From The Document Foundation Wiki
There are various tools to analyse and compare ODF/OOXML/RTF/... documents.
- odiff - compare XML content of ZIP archives (ODF, OOXML files) using wdiff
- prettyprint - Contains helpers to pretty print rtf and xml documents, and also the zipdiff tool which generates a diff over zip files.
- pyxtools - Easily compare xml files line by line, also for whole ooxml documents