XML and SOAP Serialization
XML serialization converts (serializes) the public fields and properties of an object, or the parameters and return values of methods, into an XML stream that conforms to a specific XML Schema definition language (XSD) document. XML serialization results in strongly typed classes with public properties and fields that are converted to a serial format (in this case, XML) for storage or transport.
Because XML is an open standard, the XML stream can be processed by any application, as needed, regardless of platform. For example, XML Web services created using ASP.NET use the XmlSerializer class to create XML streams that pass data between XML Web service applications throughout the Internet or on intranets. Conversely, deserialization takes such an XML stream and reconstructs the object.
XML serialization can also be used to serialize objects into XML streams that conform to the SOAP specification. SOAP is a protocol based on XML, designed specifically to transport procedure calls using XML.
To serialize or deserialize objects, use the XmlSerializer class. To create the classes to be serialized, use the XML Schema Definition tool.
In This Section
- Introducing XML Serialization
- Provides a general definition of serialization, particularly XML serialization.
- Examples of XML Serialization
- Provides examples that demonstrate the basics of XML serialization.
- The XML Schema Definition Tool and XML Serialization
- Describes how to use the XML Schema Definition tool to create classes that adhere to a particular XML Schema definition language (XSD) schema, or to generate an XML Schema from a .dll file.
- Controlling XML Serialization Using Attributes
- Describes how to control serialization by using attributes.
- Attributes That Control XML Serialization
- Lists the attributes used to control XML serialization.
- Overriding XML Serialization
- Presents an advanced scenario showing how to generate multiple XML streams by overriding the serialization.
- Working with XML Namespaces
- Describes how to define and control the way in which XML namespaces are used in the XML stream.
- XML Serialization with XML Web Services
- Explains how XML serialization is used in XML Web services.
- Generating SOAP Messages With XML Serialization
- Describes how to use the XmlSerializer class to create encoded SOAP XML streams that conform to section 5 of the World Wide Web Consortium (www.w3.org) document titled "Simple Object Access Protocol (SOAP) 1.1".
- Attributes That Control Encoded SOAP Serialization
- Lists the attributes used to control SOAP-encoded serialization.
- Programming with the .NET Framework
- Provides topics that describe how to program with the .NET Framework.
- XML Web Services and XML Web Service Clients Created Using ASP.NET
- Provides topics that describe and explain how to program XML Web services using ASP.NET.