O'Reilly logo

C# and XML Primer by Jonathan Hartwell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

© Jonathan Hartwell 2017

Jonathan Hartwell, C# and XML Primer, 10.1007/978-1-4842-2595-0_4

4. Serialization

Jonathan Hartwell

(1)Joliet, Illinois, USA

There are times when your program is the only program handling the XML, such as a configuration file or some sort of XML datastore. In times like those, it can be tedious to use LINQ to XML or the XmlDocument to load, manipulate, and save your XML, especially since you know exactly what there is. If this is the case, then you can use serialization to save and read your XML. As I indicated earlier, this technique is only proper if you are the only one using this XML document.

Creating a Model

Before you are able to serialize your XML, there has to be a model first. Serialization is completely attribute ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required