If you need to compare two XML documents, but certain elements are not in the same order between the two documents, and order of elements does not matter (i.e. the elements contain collections rather than lists), here is a nice way to do it.
Consider the following files:
user@host:~/xmldiff$ cat a.xml
<?xml version="1.0"?>
<Element xmlns="https://mynamespace.com/path">
<SubElement>
<Items>