XMLStarlet has a canonicalization mode (c14n).
c14n
Instead, you could use the xmldiff tool: Using the XML Diff and Patch Tool in Your Applications
The XML Diff and Patch GUI Tool