Using XML in the Serialization Process

Although using a proprietary serialization technique may be efficient and compact, it is not portable. XML is the standard for defining data, so we can create an XML model of our serialization example that can, at least theoretically, be used across various platforms and languages. In this section, the XML model that we create will be accessible by code written in C# .NET. In fact, there is nothing to stop you from accessing the generated XML file from a Java program, or any other language for that matter.

The primary difference between the XML model and the Java serialization model is that with the XML model, we generate an XML document. This document represents the attributes and properties of the Person ...

Get The Object-Oriented Thought Process, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.