Provides access to members that control the XML serialization and deserialization of objects.
Description
The XMLSerializer interface allows you to serialize and deserialize objects. The Serializer will call an instance of the private SerializeData and QI the objects for IXMLSerialize and call Serialize. Once the serialization is complete you ask the SerializeData to write the properties it holds using XMLWriter. The Deserialization is the opposite process and uses XMLReader.
Members
Name | Description | |
---|---|---|
LoadFromString | Loads an object from an XML string. | |
ReadObject | Reads an object from XML. | |
ReadObjectByType | Reads an object from XML given an XML type. | |
SaveToString | Saves an object to an XML string. | |
WriteObject | Writes an object as XML. |
IXMLSerializer.LoadFromString Method
Loads an object from an XML string.
Public Function LoadFromString ( _
    ByVal XML As String, _
    ByVal environment As IPropertySet, _
    ByVal flags As IXMLFlags _
) As Object
public object LoadFromString (
    string XML,
    IPropertySet environment,
    IXMLFlags flags
);
IXMLSerializer.ReadObject Method
Reads an object from XML.
Public Function ReadObject ( _
    ByVal pReader As IXMLReader, _
    ByVal environment As IPropertySet, _
    ByVal flags As IXMLFlags _
) As Object
public object ReadObject (
    IXMLReader pReader,
    IPropertySet environment,
    IXMLFlags flags
);
IXMLSerializer.ReadObjectByType Method
Reads an object from XML given an XML type.
Public Function ReadObjectByType ( _
    ByVal pReader As IXMLReader, _
    ByVal environment As IPropertySet, _
    ByVal flags As IXMLFlags, _
    ByVal typeNamespace As String, _
    ByVal TypeName As String _
) As Object
public object ReadObjectByType (
    IXMLReader pReader,
    IPropertySet environment,
    IXMLFlags flags,
    string typeNamespace,
    string TypeName
);
IXMLSerializer.SaveToString Method
Saves an object to an XML string.
Public Function SaveToString ( _
    ByVal obj As Object, _
    ByVal environment As IPropertySet, _
    ByVal flags As IXMLFlags _
) As String
public string SaveToString (
    object obj,
    IPropertySet environment,
    IXMLFlags flags
);
IXMLSerializer.WriteObject Method
Writes an object as XML.
Public Sub WriteObject ( _
    ByVal pWriter As IXMLWriter, _
    ByVal environment As IPropertySet, _
    ByVal flags As IXMLFlags, _
    ByVal elementName As String, _
    ByVal elementNamespaceURI As String, _
    ByVal obj As Object _
)
public void WriteObject (
    IXMLWriter pWriter,
    IPropertySet environment,
    IXMLFlags flags,
    string elementName,
    string elementNamespaceURI,
    object obj
);
Classes that implement IXMLSerializer
Classes | Description |
---|---|
XMLSerializer | An XML serializer and deserializer of objects. |
Remarks
The IXmlSerializer interface provides five methods to use for object serialization and deserialization. The WriteObject method writes an object as XML while ReadObject method reads an object from XML. The LoadFromString method loads an object from an XML string, while SaveToString method saves an object as an XML string. The ReadObjectType method reads an object from XML given an XML type.