Canonical XML
The purpose of canonical XML is to define a standard (canonical) format of an XML document.
Thus, to determine if two XML documents are the same, we convert the two XML documents to their canonical format. If their canonical formats are identical, byte for byte, then the two XML documents are the same.