What do you mean with "the ordering of data [...] should not matter"? XML is a data structure that has an inherent ordering of its elements. That means, if you have two documents like:
Code:
<a>
<b>1</b>
<b>2</b>
</a>
and
Code:
<a>
<b>2</b>
<b>1</b>
</a>
you have two completely different documents, which are not identical. Thus, I think that you may not use the correct data structure (XML) for your requirements.
What you can do is to split the 2 documents into a temp table, then do a set-oriented comparison.