Sean was having some problems with the .Net xml parser, it seems to think that attribute order is significant when the W3C spec says otherwise. W3C Spec:

[Definition: The beginning of every non-empty XML element is marked by astart-tag.]

Start-tag

[40] STag ::= '<'[Name](http://dotnet.org.za/controlpanel/blogs/posteditor.aspx?SelectedNavItem=NewPost#NT-Name) ([S](http://dotnet.org.za/controlpanel/blogs/posteditor.aspx?SelectedNavItem=NewPost#NT-S) [Attribute](http://dotnet.org.za/controlpanel/blogs/posteditor.aspx?SelectedNavItem=NewPost#NT-Attribute))*[S](http://dotnet.org.za/controlpanel/blogs/posteditor.aspx?SelectedNavItem=NewPost#NT-S)? '>' [WFC: Unique Att Spec]

[41] Attribute ::= [Name](http://dotnet.org.za/controlpanel/blogs/posteditor.aspx?SelectedNavItem=NewPost#NT-Name) [Eq](http://dotnet.org.za/controlpanel/blogs/posteditor.aspx?SelectedNavItem=NewPost#NT-Eq) [AttValue](http://dotnet.org.za/controlpanel/blogs/posteditor.aspx?SelectedNavItem=NewPost#NT-AttValue) [VC: Attribute Value Type]

[WFC: No External Entity References]

[WFC: No < in Attribute Values] TheName in the start- and end-tags gives the element’stype. [Definition: TheName-AttValue pairs are referred to as theattribute specifications of the element], [Definition: with theName in each pair referred to as theattribute name ] and [Definition: the content of theAttValue (the text between the' or" delimiters) as theattribute value.] Note that the order of attribute specifications in a start-tag or empty-element tag is not significant.

Microsoft’s response to Sean’s bug:

Hi Sean, This is by design.XNodeEqualityComparer was not designed to stricly adhere to the xml spec.Most people expect attribute ordering to be significant and hence XNodeEqualityComparer was designed that way. thanks Nithya Sampathkumar Program Manager

Read the full post here.