System.Xml.Serialization.XmlAttributes Class

Represents a collection of attribute objects that control how the System.Xml.Serialization.XmlSerializer serializes and deserializes an object.

See Also: XmlAttributes Members

Syntax

public class XmlAttributes

Remarks

Creating the System.Xml.Serialization.XmlAttributes is part of a process that overrides the default way the System.Xml.Serialization.XmlSerializer serializes class instances. For example, suppose you want to serialize an object that is created from a DLL which has an inaccessible source. By using the System.Xml.Serialization.XmlAttributeOverrides, you can augment or otherwise control how the object is serialized.

The members of the System.Xml.Serialization.XmlAttributes class correspond directly to a family of attribute classes that control serialization. For example, the XmlAttributes.XmlText property must be set to an System.Xml.Serialization.XmlTextAttribute, which allows you to override serialization of a field or property by instructing the System.Xml.Serialization.XmlSerializer to serialize the property value as XML text. For a complete list of attributes that control serialization, see the System.Xml.Serialization.XmlSerializer.

For more details on using the System.Xml.Serialization.XmlAttributeOverrides with the System.Xml.Serialization.XmlAttributes class, see How to: Specify an Alternate Element Name for an XML Stream.

Requirements

Namespace: System.Xml.Serialization
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0