This web site uses cookies. By using the site you accept the cookie policy.This message is for compliance with the UK ICO law.

<< Previous | 1 | Next >>
XML Deserialization EventsXML Deserialization Events
The standard XML serializer is forgiving when deserializing XML documents with unexpected elements and attributes. Generally these additional XML nodes are ignored, though their existence can be identified with the use of deserialization events.
XML Serialization of Arrays and CollectionsXML Serialization of Arrays and Collections
Arrays and collections can be serialized to XML. The standard action when using the default serializer is for the name of the collection property to be added to the XML, with a contained element for each item named according to the items' data types.
Controlling XML Serialization of EnumerationsControlling XML Serialization of Enumerations
When properties containing enumeration values are serialized to XML, the text value of the constant is added to an XML element by default. The XmlEnum attribute allows different values to be substituted for each item in the enumeration.
Controlling XML Serialization of AttributesControlling XML Serialization of Attributes
The default action, when serializing objects to XML, is for each public property and field to generate an XML element. The XmlAttribute attribute can be applied to public members to modify this behaviour and instead generate XML attributes.
Controlling Serialization of XML ElementsControlling Serialization of XML Elements
When serializing classes to XML, each public property and field value is transformed into an XML element. The name of the element matches the name of the property. The XmlElement attribute allows the names and formatting of XML tags to be modified.
Controlling XML Serialization of the Root ElementControlling XML Serialization of the Root Element
Every XML document includes a root element that contains all of the other information held. When serializing objects to XML the root element's construction is linked to the name of the class or structure unless modified with the XmlRoot attribute.
Ignoring Members During XML SerializationIgnoring Members During XML Serialization
XML serialisation is a useful way to persist objects using a clear text, human-readable solution. In some cases it is necessary to modify the default serialization and ignore some public members. This can be achieved using the XmlIgnore attribute.
XML SerializationXML Serialization
With XML serialization, the public state of objects can be converted into an XML document. Such XML information is often stored on disk to persist data for later use, or is transported over a network or the Internet to send messages between computers.
<< Previous | 1 | Next >>