The XML Serializer
The central element in the XML serialization architecture is the XmlSerializer class, which belongs to the System.Xml.Serialization namespace. The XML serialization process is articulated in the following steps:
The serializer generates an XSD schema for the target class that includes all the public properties and fields.
Using this XSD schema, the serializer generates a C# source file with a made-to-measure reader and writer class. The source file is compiled into a temporary assembly.
The Serialize and Deserialize methods are simply higher level interfaces for those writer and reader classes. This list does not cover all the features of XML serialization, but it certainly focuses on the key aspects. Let’s look more closely ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access