System.Xml.Serialization
TOC
Collapse the table of content
Expand the table of content

System.Xml.Serialization Namespace

 

The System.Xml.Serialization namespace contains classes that are used to serialize objects into XML format documents or streams.

ClassDescription
System_CAPS_pubclassCodeExporter

Represents a class that can generate proxy code from an XML representation of a data structure.

System_CAPS_pubclassCodeIdentifier

This API supports the product infrastructure and is not intended to be used directly from your code. Provides static methods to convert input text into names for code entities.

System_CAPS_pubclassCodeIdentifiers

This API supports the product infrastructure and is not intended to be used directly from your code. Maintains a group of names for related code entities or type mappings that are generated by the .NET Framework's XML serialization infrastructure.

System_CAPS_protclassXmlSerializationReader.CollectionFixup

Holds an XmlSerializationCollectionFixupCallback delegate instance, plus the method's inputs; also supplies the method's parameters.

System_CAPS_protclassXmlSerializationReader.Fixup

This API supports the product infrastructure and is not intended to be used directly from your code. Holds an XmlSerializationFixupCallback delegate instance, plus the method's inputs; also serves as the parameter for the method.

System_CAPS_pubclassImportContext

This API supports the product infrastructure and is not intended to be used directly from your code. Describes the context in which a set of schema is bound to .NET Framework code entities.

System_CAPS_pubclassSchemaImporter

Describes a schema importer.

System_CAPS_pubclassSoapAttributeAttribute

Specifies that the XmlSerializer must serialize the class member as an encoded SOAP attribute.

System_CAPS_pubclassSoapAttributeOverrides

Allows you to override attributes applied to properties, fields, and classes when you use an XmlSerializer to serialize or deserialize an object as encoded SOAP.

System_CAPS_pubclassSoapAttributes

Represents a collection of attribute objects that control how the XmlSerializer serializes and deserializes SOAP methods.

System_CAPS_pubclassSoapCodeExporter

This API supports the product infrastructure and is not intended to be used directly from your code. Generates types and attribute declarations from internal type mapping information for SOAP-encoded message parts defined in a WSDL document.

System_CAPS_pubclassSoapElementAttribute

Specifies that the public member value be serialized by the XmlSerializer as an encoded SOAP XML element.

System_CAPS_pubclassSoapEnumAttribute

Controls how the XmlSerializer serializes an enumeration member.

System_CAPS_pubclassSoapIgnoreAttribute

Instructs the XmlSerializer not to serialize the public field or public read/write property value.

System_CAPS_pubclassSoapIncludeAttribute

Allows the XmlSerializer to recognize a type when it serializes or deserializes an object as encoded SOAP XML.

System_CAPS_pubclassSoapReflectionImporter

Generates mappings to SOAP-encoded messages from .NET Framework types or Web service method information.

System_CAPS_pubclassSoapSchemaExporter

This API supports the product infrastructure and is not intended to be used directly from your code. Populates XmlSchema objects with XML Schema data type definitions for .NET Framework types that are serialized using SOAP encoding.

System_CAPS_pubclassSoapSchemaImporter

This API supports the product infrastructure and is not intended to be used directly from your code. Used within the .NET Framework to generate internal mappings to .NET Framework types for SOAP-encoded message parts in a WSDL document.

System_CAPS_pubclassSoapSchemaMember

This API supports the product infrastructure and is not intended to be used directly from your code. Represents certain attributes of a XSD <part> element in a WSDL document for generating classes from the document.

System_CAPS_pubclassSoapTypeAttribute

Controls the schema generated by the XmlSerializer when a class instance is serialized as SOAP encoded XML.

System_CAPS_pubclassUnreferencedObjectEventArgs

Provides data for the known, but unreferenced, object found in an encoded SOAP XML stream during deserialization.

System_CAPS_pubclassXmlAnyAttributeAttribute

Specifies that the member (a field that returns an array of XmlAttribute objects) can contain any XML attributes.

System_CAPS_pubclassXmlAnyElementAttribute

Specifies that the member (a field that returns an array of XmlElement or XmlNode objects) contains objects that represent any XML element that has no corresponding member in the object being serialized or deserialized.

System_CAPS_pubclassXmlAnyElementAttributes

Represents a collection of XmlAnyElementAttribute objects.

System_CAPS_pubclassXmlArrayAttribute

Specifies that the XmlSerializer must serialize a particular class member as an array of XML elements.

System_CAPS_pubclassXmlArrayItemAttribute

Represents an attribute that specifies the derived types that the XmlSerializer can place in a serialized array.

System_CAPS_pubclassXmlArrayItemAttributes

Represents a collection of XmlArrayItemAttribute objects.

System_CAPS_pubclassXmlAttributeAttribute

Specifies that the XmlSerializer must serialize the class member as an XML attribute.

System_CAPS_pubclassXmlAttributeEventArgs

Provides data for the UnknownAttribute event.

System_CAPS_pubclassXmlAttributeOverrides

Allows you to override property, field, and class attributes when you use the XmlSerializer to serialize or deserialize an object.

System_CAPS_pubclassXmlAttributes

Represents a collection of attribute objects that control how the XmlSerializer serializes and deserializes an object.

System_CAPS_pubclassXmlChoiceIdentifierAttribute

Specifies that the member can be further detected by using an enumeration.

System_CAPS_pubclassXmlCodeExporter

This API supports the product infrastructure and is not intended to be used directly from your code. Generates types and attribute declarations from internal type mapping information for XML schema element declarations.

System_CAPS_pubclassXmlElementAttribute

Indicates that a public field or property represents an XML element when the XmlSerializer serializes or deserializes the object that contains it.

System_CAPS_pubclassXmlElementAttributes

Represents a collection of XmlElementAttribute objects used by the XmlSerializer to override the default way it serializes a class.

System_CAPS_pubclassXmlElementEventArgs

Provides data for the UnknownElement event.

System_CAPS_pubclassXmlEnumAttribute

Controls how the XmlSerializer serializes an enumeration member.

System_CAPS_pubclassXmlIgnoreAttribute

Instructs the Serialize method of the XmlSerializer not to serialize the public field or public read/write property value.

System_CAPS_pubclassXmlIncludeAttribute

Allows the XmlSerializer to recognize a type when it serializes or deserializes an object.

System_CAPS_pubclassXmlMapping

This API supports the product infrastructure and is not intended to be used directly from your code. Supports mappings between .NET Framework types and XML Schema data types.

System_CAPS_pubclassXmlMemberMapping

This API supports the product infrastructure and is not intended to be used directly from your code. Maps a code entity in a .NET Framework Web service method to an element in a Web Services Description Language (WSDL) message.

System_CAPS_pubclassXmlMembersMapping

This API supports the product infrastructure and is not intended to be used directly from your code. Provides mappings between .NET Framework Web service methods and Web Services Description Language (WSDL) messages that are defined for SOAP Web services.

System_CAPS_pubclassXmlNamespaceDeclarationsAttribute

Specifies that the target property, parameter, return value, or class member contains prefixes associated with namespaces that are used within an XML document.

System_CAPS_pubclassXmlNodeEventArgs

Provides data for the UnknownNode event.

System_CAPS_pubclassXmlReflectionImporter

This API supports the product infrastructure and is not intended to be used directly from your code. Generates mappings to XML schema element declarations, including literal XML Schema Definition (XSD) message parts in a Web Services Description Language (WSDL) document, for .NET Framework types or Web service method information.

System_CAPS_pubclassXmlReflectionMember

This API supports the product infrastructure and is not intended to be used directly from your code. Provides mappings between code entities in .NET Framework Web service methods and the content of Web Services Description Language (WSDL) messages that are defined for SOAP Web services.

System_CAPS_pubclassXmlRootAttribute

Controls XML serialization of the attribute target as an XML root element.

System_CAPS_pubclassXmlSchemaEnumerator

Enables iteration over a collection of XmlSchema objects.

System_CAPS_pubclassXmlSchemaExporter

This API supports the product infrastructure and is not intended to be used directly from your code. Populates XmlSchema objects with XML schema element declarations that are found in type mapping objects.

System_CAPS_pubclassXmlSchemaImporter

This API supports the product infrastructure and is not intended to be used directly from your code. Generates internal mappings to .NET Framework types for XML schema element declarations, including literal XSD message parts in a WSDL document.

System_CAPS_pubclassXmlSchemaProviderAttribute

When applied to a type, stores the name of a static method of the type that returns an XML schema and a XmlQualifiedName (or XmlSchemaType for anonymous types) that controls the serialization of the type.

System_CAPS_pubclassXmlSchemas

This API supports the product infrastructure and is not intended to be used directly from your code. Represents the collection of XML schemas.

System_CAPS_pubclassXmlSerializationGeneratedCode

This API supports the product infrastructure and is not intended to be used directly from your code. An abstract class that is the base class for XmlSerializationReader and XmlSerializationWriter and that contains methods common to both of these types.

System_CAPS_pubclassXmlSerializationReader

This API supports the product infrastructure and is not intended to be used directly from your code. Controls deserialization by the XmlSerializer class.

System_CAPS_pubclassXmlSerializationWriter

This API supports the product infrastructure and is not intended to be used directly from your code. Represents an abstract class used for controlling serialization by the XmlSerializer class.

System_CAPS_pubclassXmlSerializer

Serializes and deserializes objects into and from XML documents. The XmlSerializer enables you to control how objects are encoded into XML.

System_CAPS_pubclassXmlSerializerAssemblyAttribute

Applied to a Web service client proxy, enables you to specify an assembly that contains custom-made serializers.

System_CAPS_pubclassXmlSerializerFactory

This API supports the product infrastructure and is not intended to be used directly from your code. Creates typed versions of the XmlSerializer for more efficient serialization.

System_CAPS_pubclassXmlSerializerImplementation

This API supports the product infrastructure and is not intended to be used directly from your code. Defines the reader, writer, and methods for pre-generated, typed serializers.

System_CAPS_pubclassXmlSerializerNamespaces

Contains the XML namespaces and prefixes that the XmlSerializer uses to generate qualified names in an XML-document instance.

System_CAPS_pubclassXmlSerializerVersionAttribute

Signifies that the code was generated by the serialization infrastructure and can be reused for increased performance, when this attribute is applied to an assembly.

System_CAPS_pubclassXmlTextAttribute

Indicates to the XmlSerializer that the member must be treated as XML text when the class that contains it is serialized or deserialized.

System_CAPS_pubclassXmlTypeAttribute

Controls the XML schema that is generated when the attribute target is serialized by the XmlSerializer.

System_CAPS_pubclassXmlTypeMapping

Contains a mapping of one type to another.

StructureDescription
System_CAPS_pubstructureXmlDeserializationEvents

Contains fields that can be used to pass event delegates to a thread-safe Deserialize method of the XmlSerializer.

InterfaceDescription
System_CAPS_pubinterfaceIXmlSerializable

Provides custom formatting for XML serialization and deserialization.

System_CAPS_pubinterfaceIXmlTextParser

This API supports the product infrastructure and is not intended to be used directly from your code. Establishes a Normalized property for use by the .NET Framework infrastructure.

DelegateDescription
System_CAPS_pubdelegateUnreferencedObjectEventHandler

Represents the method that handles the UnreferencedObject event of an XmlSerializer.

System_CAPS_pubdelegateXmlAttributeEventHandler

Represents the method that handles the UnknownAttribute

System_CAPS_pubdelegateXmlElementEventHandler

Represents the method that handles the UnknownElement event of an XmlSerializer.

System_CAPS_pubdelegateXmlNodeEventHandler

Represents the method that handles the UnknownNode event of an XmlSerializer.

System_CAPS_pubdelegateXmlSerializationCollectionFixupCallback

This API supports the product infrastructure and is not intended to be used directly from your code. Delegate used by the XmlSerializer class for deserialization of SOAP-encoded XML data types that map to collections or enumerations.

System_CAPS_pubdelegateXmlSerializationFixupCallback

This API supports the product infrastructure and is not intended to be used directly from your code. Delegate used by the XmlSerializer class for deserialization of SOAP-encoded XML data.

System_CAPS_pubdelegateXmlSerializationReadCallback

This API supports the product infrastructure and is not intended to be used directly from your code. Delegate used by the XmlSerializer class for deserialization of types from SOAP-encoded, non-root XML data.

System_CAPS_pubdelegateXmlSerializationWriteCallback

This API supports the product infrastructure and is not intended to be used directly from your code. Delegate that is used by the XmlSerializer class for serialization of types from SOAP-encoded, non-root XML data.

EnumerationDescription
System_CAPS_pubenumCodeGenerationOptions

Specifies various options to use when generating .NET Framework types for use with an XML Web Service.

System_CAPS_pubenumXmlMappingAccess

This API supports the product infrastructure and is not intended to be used directly from your code. Specifies whether a mapping is read, write, or both.

The central class in the namespace is the XmlSerializer class. To use this class, use the XmlSerializer constructor to create an instance of the class using the type of the object to serialize. Once an XmlSerializer is created, create an instance of the object to serialize. You must also create an object to write the file to a document or stream, such as a Stream, TextWriter, or XmlWriter. You can then call the M:System.Xml.Serialization.XmlSerializer.Serialize method to convert the object into an XML document.

To deserialize an object from an XML document, create a suitable object to read the document or stream (again, a Stream, TextWriter, or XmlWriter). Invoke the M:System.Xml.Serialization.XmlSerializer.Deserialize method while casting the resulting object to the type of the original object (that was serialized).

To further control the serialization, the System.Xml.Serialization namespace contains several Attribute classes that can be applied to members of a class. For example, if a class contains a member that will be serialized as an XML element, you can apply the XmlElementAttribute attribute to the member. When applying the attribute, you can specify details such as the actual XML element name using the ElementName property. For a complete list of all the attributes, see the XmlSerializer class overview.

Return to top
Show:
© 2016 Microsoft