Xml serializer
How the xml serializer works?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sam HobbsPosted Oct 17, 2011, 5:08 PM
navjyot rautPosted Oct 17, 2011, 3:53 AM
Serialization is the process of converting complex objects into stream of bytes for storage. Deserialization is its reverse process, that is unpacking stream of bytes to their original form. The namespace which is used to read and write files is
System.IO. For Serialization we are going to look at theSystem.Runtime.Serializationnamespace. TheISerializableinterface allows you to make any class Serializable.The different types of serialization are
· Binary Serialization
· XML Serialization
· SOAP Serialization
Binary Serialization
Binary serialization is the process where you convert your .NET objects into byte stream. In binary serialization all the public, private, even those which are read only, members are serialized and converted into bytes. So when you want a complete conversion of your objects to bytes then one can make use of binary serialization.
XML Serialization
In XML serialization only the public properties and fields of the objects are converted into XML. The private members are not taken into consideration in XML serialization.
SOAP Serialization
Similar to XML serialization. When you serialize object to SOAP format it conforms to the SOAP specification.