Export (0) Print
Expand All

XmlSerializationWriter Class

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Represents an abstract class used for controlling serialization by the XmlSerializer class.

Namespace:  System.Xml.Serialization
Assembly:  System.Xml (in System.Xml.dll)

public abstract class XmlSerializationWriter : XmlSerializationGeneratedCode

The XmlSerializationWriter type exposes the following members.

  NameDescription
Protected methodXmlSerializationWriterInitializes a new instance of the XmlSerializationWriter class.
Top

  NameDescription
Protected propertyEscapeNameGets or sets a value that indicates whether the EncodeName method is used to write valid XML.
Protected propertyNamespacesGets or sets a list of XML qualified name objects that contain the namespaces and prefixes used to produce qualified names in XML documents.
Protected propertyWriterGets or sets the XmlWriter that is being used by the XmlSerializationWriter.
Top

  NameDescription
Protected methodAddWriteCallbackStores an implementation of the XmlSerializationWriteCallback delegate and the type it applies to, for a later invocation.
Protected methodCreateChoiceIdentifierValueExceptionCreates an InvalidOperationException that indicates an unexpected name for an element that adheres to an XML Schema choice element declaration.
Protected methodCreateInvalidAnyTypeException(Object)Creates an InvalidOperationException that indicates the XmlAnyElementAttribute which has been invalidly applied to a member; only members that are of type XmlNode, or derived from XmlNode, are valid.
Protected methodCreateInvalidAnyTypeException(Type)Creates an InvalidOperationException that indicates the XmlAnyElementAttribute which has been invalidly applied to a member; only members that are of type XmlNode, or derived from XmlNode, are valid.
Protected methodCreateInvalidChoiceIdentifierValueExceptionCreates an InvalidOperationException that indicates a failure while writing an array where an XML Schema choice element declaration is applied.
Protected methodCreateInvalidEnumValueExceptionCreates an InvalidOperationException for an invalid enumeration value.
Protected methodCreateMismatchChoiceExceptionCreates an InvalidOperationException that indicates that a value for an XML element does not match an enumeration type.
Protected methodCreateUnknownAnyElementExceptionCreates an InvalidOperationException that indicates that an XML element that should adhere to the XML Schema any element declaration cannot be processed.
Protected methodCreateUnknownTypeException(Object)Creates an InvalidOperationException that indicates that a type being serialized is not being used in a valid manner or is unexpectedly encountered.
Protected methodCreateUnknownTypeException(Type)Creates an InvalidOperationException that indicates that a type being serialized is not being used in a valid manner or is unexpectedly encountered.
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Protected methodStatic memberFromByteArrayBase64Processes a base-64 byte array.
Protected methodStatic memberFromByteArrayHexProduces a string from an input hexadecimal byte array.
Protected methodStatic memberFromCharProduces a string from an input Char.
Protected methodStatic memberFromDateProduces a string from a DateTime object.
Protected methodStatic memberFromDateTimeProduces a string from an input DateTime.
Protected methodStatic memberFromEnum(Int64, String[], Int64[])Produces a string that consists of delimited identifiers that represent the enumeration members that have been set.
Protected methodStatic memberFromEnum(Int64, String[], Int64[], String)Takes a numeric enumeration value and the names and constants from the enumerator list for the enumeration and returns a string that consists of delimited identifiers that represent the enumeration members that have been set.
Protected methodStatic memberFromTimeProduces a string from a DateTime object.
Protected methodStatic memberFromXmlNameEncodes a valid XML name by replacing characters that are not valid with escape sequences.
Protected methodStatic memberFromXmlNCNameEncodes a valid XML local name by replacing characters that are not valid with escape sequences.
Protected methodStatic memberFromXmlNmTokenEncodes an XML name.
Protected methodStatic memberFromXmlNmTokensEncodes a space-delimited sequence of XML names into a single XML name.
Protected methodFromXmlQualifiedName(XmlQualifiedName)Returns an XML qualified name, with invalid characters replaced by escape sequences.
Protected methodFromXmlQualifiedName(XmlQualifiedName, Boolean)Produces a string that can be written as an XML qualified name, with invalid characters replaced by escape sequences.
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodInitCallbacksInitializes an instances of the XmlSerializationWriteCallback delegate to serialize SOAP-encoded XML data.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodStatic memberResolveDynamicAssemblyInfrastructure. Gets a dynamically generated assembly by name.
Protected methodTopLevelElementInitializes object references only while serializing a SOAP-encoded SOAP message.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Protected methodWriteAttribute(String, Byte[])Instructs an XmlWriter object to write an XML attribute that has no namespace specified for its name.
Protected methodWriteAttribute(String, String)Instructs the XmlWriter to write an XML attribute that has no namespace specified for its name.
Protected methodWriteAttribute(String, String, Byte[])Instructs an XmlWriter object to write an XML attribute.
Protected methodWriteAttribute(String, String, String)Writes an XML attribute.
Protected methodWriteAttribute(String, String, String, String)Writes an XML attribute where the namespace prefix is provided manually.
Protected methodWriteElementEncodedWrites an XML node object within the body of a named XML element.
Protected methodWriteElementLiteralInstructs an XmlWriter object to write an XmlNode object within the body of a named XML element.
Protected methodWriteElementQualifiedName(String, XmlQualifiedName)Writes an XML element with a specified qualified name in its body.
Protected methodWriteElementQualifiedName(String, String, XmlQualifiedName)Writes an XML element with a specified qualified name in its body.
Protected methodWriteElementQualifiedName(String, XmlQualifiedName, XmlQualifiedName)Writes an XML element with a specified qualified name in its body.
Protected methodWriteElementQualifiedName(String, String, XmlQualifiedName, XmlQualifiedName)Writes an XML element with a specified qualified name in its body.
Protected methodWriteElementString(String, String)Writes an XML element with a specified value in its body.
Protected methodWriteElementString(String, String, String)Writes an XML element with a specified value in its body.
Protected methodWriteElementString(String, String, XmlQualifiedName)Writes an XML element with a specified value in its body.
Protected methodWriteElementString(String, String, String, XmlQualifiedName)Writes an XML element with a specified value in its body.
Protected methodWriteElementStringRaw(String, Byte[])Writes an XML element with a specified value in its body.
Protected methodWriteElementStringRaw(String, String)Writes an XML element with a specified value in its body.
Protected methodWriteElementStringRaw(String, Byte[], XmlQualifiedName)Writes an XML element with a specified value in its body.
Protected methodWriteElementStringRaw(String, String, Byte[])Writes an XML element with a specified value in its body.
Protected methodWriteElementStringRaw(String, String, String)Writes an XML element with a specified value in its body.
Protected methodWriteElementStringRaw(String, String, XmlQualifiedName)Writes an XML element with a specified value in its body.
Protected methodWriteElementStringRaw(String, String, Byte[], XmlQualifiedName)Writes an XML element with a specified value in its body.
Protected methodWriteElementStringRaw(String, String, String, XmlQualifiedName)Writes an XML element with a specified value in its body.
Protected methodWriteEmptyTag(String)Writes an XML element whose body is empty.
Protected methodWriteEmptyTag(String, String)Writes an XML element whose body is empty.
Protected methodWriteEndElement()Writes a <closing> element tag.
Protected methodWriteEndElement(Object)Writes a <closing> element tag.
Protected methodWriteIdWrites an id attribute that appears in a SOAP-encoded multiRef element.
Protected methodWriteNamespaceDeclarationsInfrastructure. Writes the namespace declaration attributes.
Protected methodWriteNullableQualifiedNameEncodedWrites an XML element whose body contains a valid XML qualified name. XmlWriter inserts an xsi:nil='true' attribute if the string's value is null.
Protected methodWriteNullableQualifiedNameLiteralWrites an XML element whose body contains a valid XML qualified name. XmlWriter inserts an xsi:nil='true' attribute if the string's value is null.
Protected methodWriteNullableStringEncodedWrites an XML element that contains a string as the body. XmlWriter inserts an xsi:nil='true' attribute if the string's value is null.
Protected methodWriteNullableStringEncodedRaw(String, String, Byte[], XmlQualifiedName)Writes a byte array as the body of an XML element. XmlWriter inserts an xsi:nil='true' attribute if the string's value is null.
Protected methodWriteNullableStringEncodedRaw(String, String, String, XmlQualifiedName)Writes an XML element that contains a string as the body. XmlWriter inserts an xsi:nil='true' attribute if the string's value is null.
Protected methodWriteNullableStringLiteralWrites an XML element that contains a string as the body. XmlWriter inserts an xsi:nil='true' attribute if the string's value is null.
Protected methodWriteNullableStringLiteralRaw(String, String, Byte[])Writes a byte array as the body of an XML element. XmlWriter inserts an xsi:nil='true' attribute if the string's value is null.
Protected methodWriteNullableStringLiteralRaw(String, String, String)Writes an XML element that contains a string as the body. XmlWriter inserts a xsi:nil='true' attribute if the string's value is null.
Protected methodWriteNullTagEncoded(String)Writes an XML element with an xsi:nil='true' attribute.
Protected methodWriteNullTagEncoded(String, String)Writes an XML element with an xsi:nil='true' attribute.
Protected methodWriteNullTagLiteral(String)Writes an XML element with an xsi:nil='true' attribute.
Protected methodWriteNullTagLiteral(String, String)Writes an XML element with an xsi:nil='true' attribute.
Protected methodWritePotentiallyReferencingElement(String, String, Object)Writes a SOAP message XML element that can contain a reference to a <multiRef> XML element for a given object.
Protected methodWritePotentiallyReferencingElement(String, String, Object, Type)Writes a SOAP message XML element that can contain a reference to a <multiRef> XML element for a given object.
Protected methodWritePotentiallyReferencingElement(String, String, Object, Type, Boolean)Writes a SOAP message XML element that can contain a reference to a <multiRef> XML element for a given object.
Protected methodWritePotentiallyReferencingElement(String, String, Object, Type, Boolean, Boolean)Writes a SOAP message XML element that can contain a reference to a multiRef XML element for a given object.
Protected methodWriteReferencedElementsSerializes objects into SOAP-encoded multiRef XML elements in a SOAP message.
Protected methodWriteReferencingElement(String, String, Object)Writes a SOAP message XML element that contains a reference to a multiRef element for a given object.
Protected methodWriteReferencingElement(String, String, Object, Boolean)Writes a SOAP message XML element that contains a reference to a multiRef element for a given object.
Protected methodWriteRpcResultWrites a SOAP 1.2 RPC result element with a specified qualified name in its body.
Protected methodWriteSerializable(IXmlSerializable, String, String, Boolean)Writes an object that uses custom XML formatting as an XML element.
Protected methodWriteSerializable(IXmlSerializable, String, String, Boolean, Boolean)Instructs XmlNode to write an object that uses custom XML formatting as an XML element.
Protected methodWriteStartDocumentWrites the XML declaration if the writer is positioned at the start of an XML document.
Protected methodWriteStartElement(String)Writes an opening element tag, including any attributes.
Protected methodWriteStartElement(String, String)Writes an opening element tag, including any attributes.
Protected methodWriteStartElement(String, String, Boolean)Writes an opening element tag, including any attributes.
Protected methodWriteStartElement(String, String, Object)Writes an opening element tag, including any attributes.
Protected methodWriteStartElement(String, String, Object, Boolean)Writes an opening element tag, including any attributes.
Protected methodWriteStartElement(String, String, Object, Boolean, XmlSerializerNamespaces)Writes an opening element tag, including any attributes.
Protected methodWriteTypedPrimitiveWrites an XML element whose text body is a value of a simple XML Schema data type.
Protected methodWriteValue(Byte[])Writes a base-64 byte array.
Protected methodWriteValue(String)Writes a specified string value.
Protected methodWriteXmlAttribute(XmlNode)Writes the specified XmlNode as an XML attribute.
Protected methodWriteXmlAttribute(XmlNode, Object)Writes the specified XmlNode object as an XML attribute.
Protected methodWriteXsiTypeWrites an xsi:type attribute for an XML element that is being serialized into a document.
Top

During initialization, the .NET Framework XML serialization infrastructure dynamically generates and compiles a temporary class for serialization that is derived from the abstract XmlSerializationWriter class. XmlSerializationWriter is also implemented within the .NET Framework for serialization of DiscoveryDocument and ServiceDescription objects into XML documents.

You should not derive classes from XmlSerializationWriter. Instead, call the Serialize method.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft