 A Canonical XML document is by definition an XML document that is in XML Canonical form, defined by The Canonical XML specification.Briefly, canonicalization removes whitespace within tags, uses particular character encodings, sorts namespace references and eliminates redundant ones, removes XML and DOCTYPE declarations, and transforms relative URIs into absolute URIs.A simple example would be the following two snippets of XML