.NET: Customizing XML Object Serialization

Serializing C# objects using the .NET framework is a simple task, as is shaping the XML which results from serializing a C# object in terms of XML elements, attributes and namespaces. However, whats not so straightforward, or at least sparsely documented, is controlling what if any namespace and Xml declarations are emitted during serialization. The … Continue reading .NET: Customizing XML Object Serialization

Debugging .NET Serialization Code

Just what is your XmlSerializer doing? You can find out by debugging the serialization code which is generated automatically at runtime; 1. Modify your .config file to include the following snippet 2. Rebuild your code and set a breakpoint on or just after where you create an instance of the XmlSerializer, but before you call … Continue reading Debugging .NET Serialization Code