Coding an Xml serializer

For the software project we’re doing we have to transfer arbritrary objects from the server to the client and vice versa. This wasn’t supposed to be a big problem as .NET features the XmlSerializer, a class that can convert “any” (with some restrictions such as not being able to handle multi-dimentional arrays) kind of object to XML and can also convert them back into an object. Problem is that this software should also run on a PocketPC which uses the Compact Framework. You probably already guessed, but this compact framework doesn’t include this XmlSerializer… We looked at the internet and lots of people were having the same problem. Then we found a little library that added some of the classes that were missing, including the XmlSerializer, yay!

Until yesterday, when we first tested this XmlSerializer, it didn’t work quite as well as we had hoped. It simply excluded some properties. Then I decided to write my own. I spent yesterday afternoon and this afternoon doing it and I just finished it. It can convert about all kinds of objects to XML and back, which was actually quite a lot of work. And the cool thing is that it can also handle multi-dimentional arrays (take that Microsoft! ;)). It’s probably not bug free and needs quite a lot of testing, but I integrated into our software and it seems to work.