Export (0) Print
Expand All

XmlAttributes Class

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

System.Object
  System.Xml.Serialization.XmlAttributes

Namespace:  System.Xml.Serialization
Assembly:  System.Xml.Serialization (in System.Xml.Serialization.dll)

public class XmlAttributes

The XmlAttributes type exposes the following members.

  NameDescription
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360XmlAttributes()Initializes a new instance of the XmlAttributes class.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360XmlAttributes(ICustomAttributeProvider)Infrastructure. Initializes a new instance of the XmlAttributes class and customizes how the XmlSerializer serializes and deserializes an object.
Top

  NameDescription
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360XmlAnyElementsGets the collection of XmlAnyElementAttribute objects to override.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360XmlArrayGets or sets an object that specifies how the XmlSerializer serializes a public field or read/write property that returns an array.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360XmlArrayItemsGets or sets a collection of objects that specify how the XmlSerializer serializes items inserted into an array returned by a public field or read/write property.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360XmlAttributeGets or sets an object that specifies how the XmlSerializer serializes a public field or public read/write property as an XML attribute.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360XmlChoiceIdentifierGets or sets an object that allows you to distinguish between a set of choices.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360XmlDefaultValueGets or sets the default value of an XML element or attribute.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360XmlElementsGets a collection of objects that specify how the XmlSerializer serializes a public field or read/write property as an XML element.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360XmlEnumGets or sets an object that specifies how the XmlSerializer serializes an enumeration member.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360XmlIgnoreGets or sets a value that specifies whether the XmlSerializer serializes a public field or public read/write property.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360XmlnsGets or sets a value that specifies whether to keep all namespace declarations when an object that contains a member that returns an XmlSerializerNamespaces object is overridden.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360XmlRootGets or sets an object that specifies how the XmlSerializer serializes a class as an XML root element.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360XmlTextGets or sets an object that instructs the XmlSerializer to serialize a public field or public read/write property as XML text.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360XmlTypeGets or sets an object that specifies how the XmlSerializer serializes a class to which the XmlTypeAttribute has been applied.
Top

  NameDescription
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360Equals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodSupported by Silverlight for Windows PhoneSupported by Xbox 360FinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360GetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360GetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodSupported by Silverlight for Windows PhoneSupported by Xbox 360MemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360ToStringReturns a string that represents the current object. (Inherited from Object.)
Top

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

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

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

ADD
Show:
© 2014 Microsoft