XmlSerializer.Deserialize Metoda

Definicja

Deserializuje dokument XML.

Przeciążenia

Deserialize(Stream)

Deserializuje dokument XML zawarty przez określony Streamelement .

Deserialize(TextReader)

Deserializuje dokument XML zawarty przez określony TextReaderelement .

Deserialize(XmlSerializationReader)

Deserializuje dokument XML zawarty przez określony XmlSerializationReaderelement .

Deserialize(XmlReader)

Deserializuje dokument XML zawarty przez określony XmlReaderelement .

Deserialize(XmlReader, String)

Deserializuje dokument XML zawarty w określonym XmlReader stylu kodowania i .

Deserialize(XmlReader, XmlDeserializationEvents)

Deserializuje dokument XML zawarty przez określony XmlReader i umożliwia zastępowanie zdarzeń występujących podczas deserializacji.

Deserialize(XmlReader, String, XmlDeserializationEvents)

Deserializuje obiekt przy użyciu danych zawartych w określonym obiekcie XmlReader.

Deserialize(Stream)

Deserializuje dokument XML zawarty przez określony Streamelement .

public:
 System::Object ^ Deserialize(System::IO::Stream ^ stream);
public object Deserialize (System.IO.Stream stream);
public object? Deserialize (System.IO.Stream stream);
member this.Deserialize : System.IO.Stream -> obj
Public Function Deserialize (stream As Stream) As Object

Parametry

stream
Stream

Element Stream zawierający dokument XML do deserializacji.

Zwraca

Object

Deserializacji Object .

Przykłady

Poniższy przykład deserializuje obiekt przy użyciu Stream obiektu.

#using <System.Xml.dll>
#using <System.dll>

using namespace System;
using namespace System::IO;
using namespace System::Xml::Serialization;

// This is the class that will be deserialized.
public ref class OrderedItem
{
public:

    [XmlElement(Namespace="http://www.cpandl.com")]
    String^ ItemName;

    [XmlElement(Namespace="http://www.cpandl.com")]
    String^ Description;

    [XmlElement(Namespace="http://www.cohowinery.com")]
    Decimal UnitPrice;

    [XmlElement(Namespace="http://www.cpandl.com")]
    int Quantity;

    [XmlElement(Namespace="http://www.cohowinery.com")]
    Decimal LineTotal;

    // A custom method used to calculate price per item.
    void Calculate()
    {
        LineTotal = UnitPrice * Quantity;
    }
};

void DeserializeObject(String^ filename)
{
    Console::WriteLine("Reading with Stream");

    // Create an instance of the XmlSerializer.
    XmlSerializer^ serializer = gcnew XmlSerializer(OrderedItem::typeid);

    // Declare an object variable of the type to be deserialized.
    OrderedItem^ i;
    
    // Reading the XML document requires a FileStream.
    Stream^ reader = gcnew FileStream(filename, FileMode::Open);

    try
    {
        // Call the Deserialize method to restore the object's state.
        i = dynamic_cast<OrderedItem^>(serializer->Deserialize(reader));
    }
    finally
    {
        delete reader;
    }

    // Write out the properties of the object.
    Console::Write("{0}\t{1}\t{2}\t{3}\t{4}", i->ItemName, i->Description, i->UnitPrice, i->Quantity, i->LineTotal);
}

int main()
{
    // Read a purchase order.
    DeserializeObject( "simple.xml" );
}
using System;
using System.IO;
using System.Xml.Serialization;

// This is the class that will be deserialized.
public class OrderedItem
{
    [XmlElement(Namespace = "http://www.cpandl.com")]
    public string ItemName;
    [XmlElement(Namespace = "http://www.cpandl.com")]
    public string Description;
    [XmlElement(Namespace="http://www.cohowinery.com")]
    public decimal UnitPrice;
    [XmlElement(Namespace = "http://www.cpandl.com")]
    public int Quantity;
    [XmlElement(Namespace="http://www.cohowinery.com")]
    public decimal LineTotal;
    // A custom method used to calculate price per item.
    public void Calculate()
    {
        LineTotal = UnitPrice * Quantity;
    }
}

public class Test
{
    public static void Main()
    {
        Test t = new Test();
        // Read a purchase order.
        t.DeserializeObject("simple.xml");
    }

    private void DeserializeObject(string filename)
    {
        Console.WriteLine("Reading with Stream");
        // Create an instance of the XmlSerializer.
        XmlSerializer serializer =
        new XmlSerializer(typeof(OrderedItem));

        // Declare an object variable of the type to be deserialized.
        OrderedItem i;

        using (Stream reader = new FileStream(filename, FileMode.Open))
        {
            // Call the Deserialize method to restore the object's state.
            i = (OrderedItem)serializer.Deserialize(reader);
        }

        // Write out the properties of the object.
        Console.Write(
        i.ItemName + "\t" +
        i.Description + "\t" +
        i.UnitPrice + "\t" +
        i.Quantity + "\t" +
        i.LineTotal);
    }
}
Imports System.IO
Imports System.Xml.Serialization

' This is the class that will be deserialized.
Public Class OrderedItem
    <XmlElement(Namespace := "http://www.cpandl.com")> _
    Public ItemName As String

    <XmlElement(Namespace := "http://www.cpandl.com")> _
    Public Description As String
    
    <XmlElement(Namespace := "http://www.cohowinery.com")> _
    Public UnitPrice As Decimal
    
    <XmlElement(Namespace := "http://www.cpandl.com")> _
    Public Quantity As Integer
    
    <XmlElement(Namespace := "http://www.cohowinery.com")> _
    Public LineTotal As Decimal
    
    'A custom method used to calculate price per item.
    Public Sub Calculate()
        LineTotal = UnitPrice * Quantity
    End Sub
End Class

Public Class Test
    
    Public Shared Sub Main()
        Dim t As New Test()
        ' Read a purchase order.
        t.DeserializeObject("simple.xml")
    End Sub
        
    Private Sub DeserializeObject(ByVal filename As String)
        Console.WriteLine("Reading with Stream")
        ' Create an instance of the XmlSerializer.
        Dim serializer As New XmlSerializer(GetType(OrderedItem))       
        
        ' Declare an object variable of the type to be deserialized.
        Dim i As OrderedItem

        Using reader As New Filestream(filename, FileMode.Open)

            ' Call the Deserialize method to restore the object's state.
            i = CType(serializer.Deserialize(reader), OrderedItem)
        End Using

        ' Write out the properties of the object.
        Console.Write(i.ItemName & ControlChars.Tab & _
                      i.Description & ControlChars.Tab & _
                      i.UnitPrice & ControlChars.Tab & _
                      i.Quantity & ControlChars.Tab & _
                      i.LineTotal)
    End Sub
End Class
<?xml version="1.0"?>
 <OrderedItem xmlns:inventory="http://www.cpandl.com" xmlns:money="http://www.cohowinery.com">
   <inventory:ItemName>Widget</inventory:ItemName>
   <inventory:Description>Regular Widget</inventory:Description>
   <money:UnitPrice>2.3</money:UnitPrice>
   <inventory:Quantity>10</inventory:Quantity>
   <money:LineTotal>23</money:LineTotal>
 </OrderedItem>

Uwagi

Deserializacja to proces odczytywania dokumentu XML i konstruowania obiektu, który jest silnie wpisany do schematu XML (XSD) dokumentu.

Przed deserializacji XmlSerializer należy utworzyć obiekt przy użyciu typu obiektu, który jest deserializowany.

Użyj parametru stream , aby określić obiekt pochodzący z Stream klasy, który jest przeznaczony do zapisu w strumieniach. Klasy pochodzące z Stream klasy obejmują:

Uwaga

Nie XmlSerializer można wykonać deserializacji następujących elementów: tablic i ArrayList tablic .List<T>

Zobacz też

Dotyczy

Deserialize(TextReader)

Deserializuje dokument XML zawarty przez określony TextReaderelement .

public:
 System::Object ^ Deserialize(System::IO::TextReader ^ textReader);
public object Deserialize (System.IO.TextReader textReader);
public object? Deserialize (System.IO.TextReader textReader);
member this.Deserialize : System.IO.TextReader -> obj
Public Function Deserialize (textReader As TextReader) As Object

Parametry

textReader
TextReader

Element TextReader zawierający dokument XML do deserializacji.

Zwraca

Object

Deserializacji Object .

Wyjątki

Wystąpił błąd podczas deserializacji. Oryginalny wyjątek jest dostępny przy użyciu InnerException właściwości .

Przykłady

Poniższy przykład deserializuje obiekt przy użyciu TextReader obiektu.

#using <System.Xml.dll>
#using <System.dll>

using namespace System;
using namespace System::IO;
using namespace System::Text;
using namespace System::Xml::Serialization;

// This is the class that will be deserialized.
public ref class OrderedItem
{
public:
    String^ ItemName;
    String^ Description;
    Decimal UnitPrice;
    int Quantity;
    Decimal LineTotal;

    // A custom method used to calculate price per item.
    void Calculate()
    {
        LineTotal = UnitPrice * Quantity;
    }
};

void DeserializeObject( String^ filename )
{
    Console::WriteLine( "Reading with TextReader" );

    // Create an instance of the XmlSerializer specifying type.
    XmlSerializer^ serializer = gcnew XmlSerializer( OrderedItem::typeid );

    /* Create a TextReader to read the file. Specify an
       Encoding to use. */
    TextReader^ reader = gcnew StreamReader( filename,Encoding::Unicode );

    // Declare an object variable of the type to be deserialized.
    OrderedItem^ i;

    // Use the Deserialize method to restore the object's state.
    i = dynamic_cast<OrderedItem^>(serializer->Deserialize( reader ));

    // Write out the properties of the object.
    Console::Write( "{0}\t{1}\t{2}\t{3}\t{4}", i->ItemName, i->Description, i->UnitPrice, i->Quantity, i->LineTotal );
}

int main()
{
    // Read a purchase order.
    DeserializeObject( "simple.xml" );
}
using System;
using System.IO;
using System.Text;
using System.Xml.Serialization;

// This is the class that will be deserialized.
public class OrderedItem
{
    [XmlElement(Namespace = "http://www.cpandl.com")]
    public string ItemName;
    [XmlElement(Namespace = "http://www.cpandl.com")]
    public string Description;
    [XmlElement(Namespace = "http://www.cohowinery.com")]
    public decimal UnitPrice;
    [XmlElement(Namespace = "http://www.cpandl.com")]
    public int Quantity;
    [XmlElement(Namespace = "http://www.cohowinery.com")]
    public decimal LineTotal;
    // A custom method used to calculate price per item.
    public void Calculate()
    {
        LineTotal = UnitPrice * Quantity;
    }
}

public class Test
{
   public static void Main()
    {
        Test t = new Test();
        // Read a purchase order.
        t.DeserializeObject("simple.xml");
    }

    private void DeserializeObject(string filename)
    {
        Console.WriteLine("Reading with TextReader");

        // Create an instance of the XmlSerializer specifying type.
        XmlSerializer serializer =
        new XmlSerializer(typeof(OrderedItem));

        // Create a TextReader to read the file.
        FileStream fs = new FileStream(filename, FileMode.OpenOrCreate);
        TextReader reader = new StreamReader(fs);

        // Declare an object variable of the type to be deserialized.
        OrderedItem i;

        // Use the Deserialize method to restore the object's state.
        i = (OrderedItem) serializer.Deserialize(reader);

        // Write out the properties of the object.
        Console.Write(
            i.ItemName + "\t" +
            i.Description + "\t" +
            i.UnitPrice + "\t" +
            i.Quantity + "\t" +
            i.LineTotal);
    }
}
Imports System.IO
Imports System.Text
Imports System.Xml.Serialization

' This is the class that will be deserialized.
Public Class OrderedItem
    <XmlElement(Namespace := "http://www.cpandl.com")> _
    Public ItemName As String

    <XmlElement(Namespace := "http://www.cpandl.com")> _
    Public Description As String
    
    <XmlElement(Namespace := "http://www.cohowinery.com")> _
    Public UnitPrice As Decimal
    
    <XmlElement(Namespace := "http://www.cpandl.com")> _
    Public Quantity As Integer
    
    <XmlElement(Namespace := "http://www.cohowinery.com")> _
    Public LineTotal As Decimal
    ' A custom method used to calculate price per item.
    Public Sub Calculate()
        LineTotal = UnitPrice * Quantity
    End Sub
End Class
Public Class Test
    
    Public Shared Sub Main()
        Dim t As New Test()
        ' Read a purchase order.
        t.DeserializeObject("simple.xml")
    End Sub
    
    Private Sub DeserializeObject(filename As String)
        Console.WriteLine("Reading with TextReader")
        
        ' Create an instance of the XmlSerializer specifying type.
        Dim serializer As New XmlSerializer(GetType(OrderedItem))
        
        ' Create a TextReader to read the file. 
        Dim fs as New FileStream(filename, FileMode.OpenOrCreate)
        Dim reader As New StreamReader(fs)
        
        ' Declare an object variable of the type to be deserialized.
        Dim i As OrderedItem
        
        ' Use the Deserialize method to restore the object's state.
        i = CType(serializer.Deserialize(reader), OrderedItem)
        
        ' Write out the properties of the object.
        Console.Write(i.ItemName & ControlChars.Tab & _
                      i.Description & ControlChars.Tab & _
                      i.UnitPrice & ControlChars.Tab & _
                      i.Quantity & ControlChars.Tab & _
                      i.LineTotal)
    End Sub
End Class

Uwagi

Deserializacja to proces odczytywania wystąpienia dokumentu XML i konstruowania obiektu, który jest silnie wpisany do schematu XML (XSD) dokumentu.

Przed deserializacji XmlSerializer należy utworzyć obiekt przy użyciu typu obiektu, który jest deserializowany.

Klasy dziedziczone z TextReader elementów include StringReader i StreamReader. Jeśli używasz elementu StreamReader do deserializacji obiektu, musisz utworzyć obiekt StreamReader z odpowiednim Encodingelementem . Kodowanie określone przez dokument XML jest ignorowane.

Uwaga

Aby użyć kodowania określonego przez dokument XML, użyj Deserialize przeciążenia, które przyjmuje XmlReader zamiast niego. Program XmlReader automatycznie wykrywa kodowanie określone przez dokument XML i używa go.

Uwaga

Nie XmlSerializer można wykonać deserializacji następujących elementów: tablic i ArrayList tablic .List<T>

Zobacz też

Dotyczy

Deserialize(XmlSerializationReader)

Deserializuje dokument XML zawarty przez określony XmlSerializationReaderelement .

protected:
 virtual System::Object ^ Deserialize(System::Xml::Serialization::XmlSerializationReader ^ reader);
protected virtual object Deserialize (System.Xml.Serialization.XmlSerializationReader reader);
abstract member Deserialize : System.Xml.Serialization.XmlSerializationReader -> obj
override this.Deserialize : System.Xml.Serialization.XmlSerializationReader -> obj
Protected Overridable Function Deserialize (reader As XmlSerializationReader) As Object

Parametry

reader
XmlSerializationReader

Element XmlSerializationReader zawierający dokument XML do deserializacji.

Zwraca

Object

Obiekt deserializatora.

Wyjątki

Każda próba uzyskania dostępu do metody jest podejmowana, gdy metoda nie jest zastępowana w klasie potomnej.

Dotyczy

Deserialize(XmlReader)

Deserializuje dokument XML zawarty przez określony XmlReaderelement .

public:
 System::Object ^ Deserialize(System::Xml::XmlReader ^ xmlReader);
public object Deserialize (System.Xml.XmlReader xmlReader);
public object? Deserialize (System.Xml.XmlReader xmlReader);
member this.Deserialize : System.Xml.XmlReader -> obj
Public Function Deserialize (xmlReader As XmlReader) As Object

Parametry

xmlReader
XmlReader

Element XmlReader zawierający dokument XML do deserializacji.

Zwraca

Object

Deserializacji Object .

Wyjątki

Wystąpił błąd podczas deserializacji. Oryginalny wyjątek jest dostępny przy użyciu InnerException właściwości .

Przykłady

Poniższy przykład deserializuje obiekt przy użyciu klasy XmlReader.

#using <System.Xml.dll>
#using <System.dll>

using namespace System;
using namespace System::IO;
using namespace System::Text;
using namespace System::Xml;
using namespace System::Xml::Serialization;

// This is the class that will be deserialized.
public ref class OrderedItem
{
public:
    String^ ItemName;
    String^ Description;
    Decimal UnitPrice;
    int Quantity;
    Decimal LineTotal;

    // A custom method used to calculate price per item.
    void Calculate()
    {
        LineTotal = UnitPrice * Quantity;
    }
};

void DeserializeObject( String^ filename )
{
    Console::WriteLine( "Reading with XmlReader" );

    // Create an instance of the XmlSerializer specifying type and namespace.
    XmlSerializer^ serializer = gcnew XmlSerializer( OrderedItem::typeid );

    // A FileStream is needed to read the XML document.
    FileStream^ fs = gcnew FileStream( filename,FileMode::Open );
    XmlReader^ reader = gcnew XmlTextReader( fs );

    // Declare an object variable of the type to be deserialized.
    OrderedItem^ i;

    // Use the Deserialize method to restore the object's state.
    i = dynamic_cast<OrderedItem^>(serializer->Deserialize( reader ));

    // Write out the properties of the object.
    Console::Write( "{0}\t{1}\t{2}\t{3}\t{4}", i->ItemName, i->Description, i->UnitPrice, i->Quantity, i->LineTotal );
}

int main()
{
    // Read a purchase order.
    DeserializeObject( "simple.xml" );
}
using System;
using System.IO;
using System.Text;
using System.Xml;
using System.Xml.Serialization;

// This is the class that will be deserialized.
public class OrderedItem
{
    public string ItemName;
    public string Description;
    public decimal UnitPrice;
    public int Quantity;
    public decimal LineTotal;

    // A custom method used to calculate price per item.
    public void Calculate()
    {
        LineTotal = UnitPrice * Quantity;
    }
}
public class Test
{
    public static void Main(string[] args)
    {
        Test t = new Test();
        // Read a purchase order.
        t.DeserializeObject("simple.xml");
    }

    private void DeserializeObject(string filename)
    {
        Console.WriteLine("Reading with XmlReader");

        // Create an instance of the XmlSerializer specifying type and namespace.
        XmlSerializer serializer = new
        XmlSerializer(typeof(OrderedItem));

        // A FileStream is needed to read the XML document.
        FileStream fs = new FileStream(filename, FileMode.Open);
        XmlReader reader = XmlReader.Create(fs);

        // Declare an object variable of the type to be deserialized.
        OrderedItem i;

        // Use the Deserialize method to restore the object's state.
        i = (OrderedItem)serializer.Deserialize(reader);
        fs.Close();

        // Write out the properties of the object.
        Console.Write(
        i.ItemName + "\t" +
        i.Description + "\t" +
        i.UnitPrice + "\t" +
        i.Quantity + "\t" +
        i.LineTotal);
    }
}
Imports System.IO
Imports System.Text
Imports System.Xml
Imports System.Xml.Serialization

' This is the class that will be deserialized.
Public Class OrderedItem
    Public ItemName As String
    Public Description As String
    Public UnitPrice As Decimal
    Public Quantity As Integer
    Public LineTotal As Decimal
        
    ' A custom method used to calculate price per item.
    Public Sub Calculate()
        LineTotal = UnitPrice * Quantity
    End Sub
End Class

Public Class Test
    
    Public Shared Sub Main()
        Dim t As New Test()
        ' Read a purchase order.
        t.DeserializeObject("simple.xml")
    End Sub
      
    Private Sub DeserializeObject(ByVal filename As String)
        Console.WriteLine("Reading with XmlReader")
        
        ' Create an instance of the XmlSerializer specifying type and namespace.
        Dim serializer As New XmlSerializer(GetType(OrderedItem))
        
        ' A FileStream is needed to read the XML document.
        Dim fs As New FileStream(filename, FileMode.Open)
        Dim reader As XmlReader = XmlReader.Create(fs)
        
        ' Declare an object variable of the type to be deserialized.
        Dim i As OrderedItem
        
        ' Use the Deserialize method to restore the object's state.
        i = CType(serializer.Deserialize(reader), OrderedItem)
        fs.Close()

        ' Write out the properties of the object.
        Console.Write(i.ItemName & ControlChars.Tab & _
                      i.Description & ControlChars.Tab & _
                      i.UnitPrice & ControlChars.Tab & _
                      i.Quantity & ControlChars.Tab & _
                      i.LineTotal)
    End Sub
End Class
<?xml version="1.0"?>
 <OrderedItem xmlns:inventory="http://www.cpandl.com" xmlns:money="http://www.cohowinery.com">
   <inventory:ItemName>Widget</inventory:ItemName>
   <inventory:Description>Regular Widget</inventory:Description>
   <money:UnitPrice>2.3</money:UnitPrice>
   <inventory:Quantity>10</inventory:Quantity>
   <money:LineTotal>23</money:LineTotal>
 </OrderedItem>

Uwagi

Deserializacja to proces odczytywania wystąpienia dokumentu XML i konstruowania obiektu, który jest silnie wpisany do schematu XML (XSD) dokumentu.

Przed deserializacji XmlSerializer należy utworzyć obiekt przy użyciu typu obiektu, który jest deserializowany.

Program XmlReader automatycznie wykrywa kodowanie określone przez dokument XML i używa go.

Uwaga

Nie XmlSerializer można wykonać deserializacji następujących elementów: tablic i ArrayList tablic .List<T>

Zobacz też

Dotyczy

Deserialize(XmlReader, String)

Deserializuje dokument XML zawarty w określonym XmlReader stylu kodowania i .

public:
 System::Object ^ Deserialize(System::Xml::XmlReader ^ xmlReader, System::String ^ encodingStyle);
public object? Deserialize (System.Xml.XmlReader xmlReader, string? encodingStyle);
public object Deserialize (System.Xml.XmlReader xmlReader, string encodingStyle);
member this.Deserialize : System.Xml.XmlReader * string -> obj
Public Function Deserialize (xmlReader As XmlReader, encodingStyle As String) As Object

Parametry

xmlReader
XmlReader

Element XmlReader zawierający dokument XML do deserializacji.

encodingStyle
String

Styl kodowania serializowanego kodu XML.

Zwraca

Object

Obiekt deserializatora.

Wyjątki

Wystąpił błąd podczas deserializacji. Oryginalny wyjątek jest dostępny przy użyciu InnerException właściwości .

Uwagi

Deserializacja to proces odczytywania wystąpienia dokumentu XML i konstruowania obiektu, który jest silnie wpisany do schematu XML (XSD) dokumentu.

Przed deserializacji XmlSerializer należy utworzyć obiekt przy użyciu typu obiektu, który jest deserializowany.

encodingStyle Ustaw parametr na "http://schemas.xmlsoap.org/soap/encoding/" dla kodowania SOAP w wersji 1.1. W przeciwnym razie ustaw go na wartość "http://www.w3.org/2001/12/soap-encoding" dla kodowania SOAP w wersji 1.2.

Uwaga Nie XmlSerializer można wykonać deserializacji następujących elementów: tablic i ArrayList tablic .List<T>

Zobacz też

Dotyczy

Deserialize(XmlReader, XmlDeserializationEvents)

Deserializuje dokument XML zawarty przez określony XmlReader i umożliwia zastępowanie zdarzeń występujących podczas deserializacji.

public:
 System::Object ^ Deserialize(System::Xml::XmlReader ^ xmlReader, System::Xml::Serialization::XmlDeserializationEvents events);
public object? Deserialize (System.Xml.XmlReader xmlReader, System.Xml.Serialization.XmlDeserializationEvents events);
public object Deserialize (System.Xml.XmlReader xmlReader, System.Xml.Serialization.XmlDeserializationEvents events);
member this.Deserialize : System.Xml.XmlReader * System.Xml.Serialization.XmlDeserializationEvents -> obj
Public Function Deserialize (xmlReader As XmlReader, events As XmlDeserializationEvents) As Object

Parametry

xmlReader
XmlReader

Element XmlReader zawierający dokument do deserializacji.

Zwraca

Object

Deserializacji Object .

Uwagi

Obiekt jest deserializowany.

Dotyczy

Deserialize(XmlReader, String, XmlDeserializationEvents)

Deserializuje obiekt przy użyciu danych zawartych w określonym obiekcie XmlReader.

public:
 System::Object ^ Deserialize(System::Xml::XmlReader ^ xmlReader, System::String ^ encodingStyle, System::Xml::Serialization::XmlDeserializationEvents events);
public object? Deserialize (System.Xml.XmlReader xmlReader, string? encodingStyle, System.Xml.Serialization.XmlDeserializationEvents events);
public object Deserialize (System.Xml.XmlReader xmlReader, string encodingStyle, System.Xml.Serialization.XmlDeserializationEvents events);
member this.Deserialize : System.Xml.XmlReader * string * System.Xml.Serialization.XmlDeserializationEvents -> obj
Public Function Deserialize (xmlReader As XmlReader, encodingStyle As String, events As XmlDeserializationEvents) As Object

Parametry

xmlReader
XmlReader

Wystąpienie XmlReader klasy używane do odczytania dokumentu.

encodingStyle
String

Użyte kodowanie.

Zwraca

Object

Obiekt jest deserializowany.

Uwagi

Ta metoda jest wymagana do deserializacji nieznanych nagłówków tylko w scenariuszach usługi sieci Web. Ta metoda pozwala uniknąć synchronizacji zdarzeń w metodach usługi sieci Web.

Dotyczy