Export (0) Print
Expand All

XmlAttributes.XmlAnyElements Property

Gets the collection of XmlAnyElementAttribute objects to override.

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

public XmlAnyElementAttributes XmlAnyElements { get; }

Property Value

Type: System.Xml.Serialization.XmlAnyElementAttributes
An XmlAnyElementAttributes object that represents the collection of XmlAnyElementAttribute objects.

The XmlAnyElementAttribute can be applied to a member that returns an array of XmlElement objects on deserialization. This allows the XmlSerializer to deserialize any elements that do not have a corresponding member in the object being deserialized; thus, those elements are "unknown" to the XmlSerializer. This is useful when the XML stream has been altered by an XML Web service or when it is known that random data is always included with the XML stream.

The XmlAnyElements property allows you to override the serialization of a member to function as a member to which the XmlAnyElementAttribute has been applied.

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.

Community Additions

ADD
Show:
© 2015 Microsoft