TL;DR: XmlDocument.Validate is not a read-only operation. but changes the document tree. XDocument.Load(XmlReader) adds attributes, even if they are marked as unspecified.
TL;DR: Always use the /order option when using xsd.exe. If you have ever generated C# classes from an XML schema, chances are you used xsd.exe for that.You probably also expected…