XmlObjectSerializer Class
System.Runtime.Serialization
Represents an abstract base class that serializes and deserializes objects to and from XML. The derived classes provide specific serialization behavior.
This class is the base for classes like DataContractSerializer and XmlSerializer, enabling common operations for XML serialization.
Syntax
public abstract class XmlObjectSerializer : ObjectSerializer
Inheritance
System.Object
System.Runtime.Serialization.ObjectSerializer
System.Runtime.Serialization.XmlObjectSerializer
Derived Classes
Members
The XmlObjectSerializer class has the following members:
| Name | Description |
|---|---|
| Methods | Provides methods to serialize and deserialize objects. |
| Properties | Exposes configuration and state information. |
| Events | Not applicable for this abstract class. |
Methods
| Signature | Description |
|---|---|
IsStartObject(XmlDictionaryReader reader) |
Determines whether the current XML node represents an object serialized by this serializer. |
ReadObject(XmlDictionaryReader reader) |
Reads an object from the current XML node. |
WriteObject(XmlWriter writer, object graph) |
Writes an object to the specified XML writer. |
WriteObjectContent(XmlWriter writer, object graph) |
Writes the content of an object to the specified XML writer. |
WriteStartObject(XmlWriter writer, object graph) |
Writes the beginning of an object to the specified XML writer. |
WriteEndObject(XmlWriter writer) |
Writes the end of an object to the specified XML writer. |
Properties
| Signature | Description |
|---|---|
MaxDepth |
Gets or sets the maximum depth of the XML document. |