System.Xml.Serialization.XmlSerializer.UnknownAttribute Event

Occurs when the System.Xml.Serialization.XmlSerializer encounters an XML attribute of unknown type during deserialization.

Syntax

public event XmlAttributeEventHandler UnknownAttribute

Remarks

By default, after calling the XmlSerializer.Deserialize(System.IO.Stream) method, the System.Xml.Serialization.XmlSerializer ignores XML attributes of unknown types. However, you can use this event to handle such node types.

If the instance of the class being deserialized contains a field that returns an array of System.Xml.XmlAttribute objects and an System.Xml.Serialization.XmlAnyAttributeAttribute has been applied to the field, the XmlSerializer.UnknownAttribute event does not occur. Instead, all unknown XML attributes are collected into the array.

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