October 22, 2012

XML Serialization


A long time ago I had to implement some data storage between restartings of application in one of my projects. I started looking for the best solution to do that and one of them using .NET Settings files (about that I`ll write in the future), another – to use serialization (I`ve chosen xml serialization because it is more human readable and flexible).
Serialization is the process of converting an object into a stream of bytes in order to store or transmit it.
Deserialization is the opposite process to serialization – converting data to object.

The most used serialization types in .NET Framework:
  • Binary serialization (is the serialization process with binary data as a result)
  • Xml serialization (is the serialization process with XML data as a result)
XML serialization approach is “cross platform”. We can serialize data in one application (for example java-based) and deserialize it in .NET app.

Want to know more about XML Serialization? Welcome...