Customizing Xml Serialization

Consider the following implementation of the Person class:

image

When you serialize an instance of that Person class, you would obtain an Xml representation similar to the following:

image

The System.Xml.Serialization namespace offers attributes for controlling output of the Xml serialization to affect the target file. For example, see the following code:

image

When an instance is serialized, the output looks like the following:

The ...

Get Visual Basic® 2010 Unleashed 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.