Acho que você pode usar uma ferramenta como xmldiff para esse propósito.
Na página da Web de ferramentas, ele afirma:
The standard Unix tools diff and patch are used to find the differences between text files and to apply the differences. These tools operate on a line by line basis using well-studied methods for computing the longest common subsequence (LCS).
Using these tools on hierarchically structured data (XML etc) leads to sub-optimal results, as they are incapable of recognizing the tree-based structure of these files.