Comparing two xml files in python

This is actually a reasonably challenging problem (due to what “difference” means often being in the eye of the beholder here, as there will be semantically “equivalent” information that you probably don’t want marked as differences).

You could try using xmldiff, which is based on work in the paper Change Detection in Hierarchically Structured Information.

Leave a Comment