Skip to main content

.NET complaint of the month: XmlDocument is not serializable

I gotta say, on the whole, I'm quite pleased with this .NET Framework that Microsoft has provided us with to develop software with. It's not often that I find something worth complaining about. But this is one of those times.

One of the cool features of .NET is that you can mark a class, or other data structure as serializable, which basically means that the structure and all its data can be easily tossed across a wire, performing a 'deep' copy. This is typically performed by creating an XML representation of that object and its data in a SOAP (Simple Object Access Protocol) envelope, or some binary form.

Now for the irony: The System.Xml.XmlDocument class is not fucking serializable. Yes, that's right. Microsoft's implementation of the very stuff used to serialize arbitrary objects is itself not serializable. I had to implement my interface with strings instead. Figure that out.

Originally posted on Tuesday, 2006-12-19 at 19:04:44.