This project is a result of being unhappy with most of .NET's XML serialization options. It is designed for people who want to write XML serialization code by hand. The net effect is generally to have better error checking, a more concise class hierarchy,
and to make debugging easier.
This method allows the use of XmlSerializer but relies on the Linq XObject classes for the mundane details. The method of serialization is designed to strike a compromise between easy to understand and compatible with traditional XML Serialization code. With
minor changes, this method can be used in a targeted manner, to "fix" the serialization of a problem class in otherwise XmlSerializable code.
The easiest method to use this code is as follows:
Use any of the various programs (xsd.exe, svcutil.exe, etc) that create code from XSDs.
Grab the plain-old class objects from the generated code, leaving behind the cruft.
Modify these plain-old classes to derive from the XmlBase abstract class.
Write custom XML serialization code by overriding the ReadXml and WriteXml methods.
Add the "XmlRoot" attribute to any classes that might be used as an XML root.
Use XmlSerializer on your new classes.