Unit testing my serialization code I found one failed because I had attributes listed in a different order (I\'m just comparing the XDocument.ToString() values) and while I
XNode has a DeepEquals function that should do the trick.
http://msdn.microsoft.com/en-us/library/system.xml.linq.xnode.deepequals.aspx
Update:
It appears that the DeepEquals function doesn't always work correctly. You may be best off implementing your own comparison routine.
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=400469