shubham kumar
What is the difference between XML Serialization and Binary Serialization?
By shubham kumar in XML on Jul 16 2012
  • Keerthi Venkatesan
    Aug, 2016 3

    In Xml Serialization, we use namespace named System.Xml.Serialization but in Binary Serialization, we use namespace named System.RunTime.Serialization.Formatters.Binary.

    • 1
  • Keerthi Venkatesan
    Aug, 2016 3

    Binary Serialization is more efficient and fast. We can write an object in binary form little faster than Xml or text. Binary data saves memory and bandwidth and easier to parse than XML.

    • 0
  • Keerthi Venkatesan
    Aug, 2016 3

    Xml is more interoperable and human readable than binary.

    • 0
  • Keerthi Venkatesan
    Aug, 2016 3

    Xml Serializer need not mention serializable attribute on the class but Binary Serializer need serializable attribute.

    • 0
  • Keerthi Venkatesan
    Aug, 2016 3

    Xml Serializer requires type of object to be serialized or deserialized but Binary Serializer need not worry about the type of object.

    • 0
  • Keerthi Venkatesan
    Aug, 2016 3

    In Xml Serializer, the class should have default constructor and class should itself have public but Binary Serializer neither require default constructor nor default access.

    • 0
  • Keerthi Venkatesan
    Aug, 2016 3

    Xml Serializer serializes only public member of object but Binary Serializer serializes all member whether public or private.

    • 0
  • Keerthi Venkatesan
    Aug, 2016 3

    In Xml Serialization, some of object state is only saved but in Binary Serialization, entire object state is saved.

    • 0
  • Keerthi Venkatesan
    Aug, 2016 3

    Since object is converted into Xml file in Xml Serialization and hence it is easily portable to other platform to reuse but in Binary Serialization, object is converted to native binary copy of that object and hence it is not portable to other platform because every platform has their own native structure.

    • 0
  • Keerthi Venkatesan
    Aug, 2016 3

    In Xml Serialization, the object is converted to XML file and in Binary Serialization, object is converted into a binary file.

    • 0
  • Munesh Sharma
    Oct, 2014 13

    http://www.codingnodes.com/2013/09/difference-between-xml-serialization.html

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS