Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

XmlMediaTypeFormatter Class

 

MediaTypeFormatter class to handle Xml.

Namespace:   System.Net.Http.Formatting
Assembly:  System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)

System::Object
  System.Net.Http.Formatting::MediaTypeFormatter
    System.Net.Http.Formatting::XmlMediaTypeFormatter

public ref class XmlMediaTypeFormatter : MediaTypeFormatter

NameDescription
System_CAPS_pubmethodXmlMediaTypeFormatter()

Initializes a new instance of the XmlMediaTypeFormatter class.

System_CAPS_protmethodXmlMediaTypeFormatter(XmlMediaTypeFormatter^)

Initializes a new instance of the XmlMediaTypeFormatter class.

NameDescription
System_CAPS_pubpropertySystem_CAPS_staticDefaultMediaType

Gets the default media type for the XML formatter.

System_CAPS_pubpropertyIndent

Gets or sets a value indicating whether to indent elements when writing data.

System_CAPS_pubpropertyMaxDepth

Gets and sets the maximum nested node depth.

System_CAPS_pubpropertyMediaTypeMappings

Gets the mutable collection of MediaTypeMapping objects that match HTTP requests to media types.(Inherited from MediaTypeFormatter.)

System_CAPS_pubpropertyRequiredMemberSelector

Gets or sets the IRequiredMemberSelector instance used to determine required members.(Inherited from MediaTypeFormatter.)

System_CAPS_pubpropertySupportedEncodings

Gets the mutable collection of character encodings supported bythis MediaTypeFormatter.(Inherited from MediaTypeFormatter.)

System_CAPS_pubpropertySupportedMediaTypes

Gets the mutable collection of media types supported bythis MediaTypeFormatter.(Inherited from MediaTypeFormatter.)

System_CAPS_pubpropertyUseXmlSerializer

Gets or sets a value indicating whether the XML formatter uses the XmlSerializer as the default serializer, instead of using the DataContractSerializer.

System_CAPS_pubpropertyWriterSettings

Gets the settings to be used while writing.

NameDescription
System_CAPS_pubmethodCanReadType(Type^)

Queries whether the XmlMediaTypeFormatter can deserializean object of the specified type.(Overrides MediaTypeFormatter::CanReadType(Type^).)

System_CAPS_pubmethodCanWriteType(Type^)

Queries whether the XmlMediaTypeFormatter can serializean object of the specified type.(Overrides MediaTypeFormatter::CanWriteType(Type^).)

System_CAPS_pubmethodCreateDataContractSerializer(Type^)

Called during deserialization to get the DataContractSerializer serializer.

System_CAPS_protmethodCreateXmlReader(Stream^, HttpContent^)

Called during deserialization to get the XML reader to use for reading objects from the stream.

System_CAPS_pubmethodCreateXmlSerializer(Type^)

Called during deserialization to get the XML serializer.

System_CAPS_protmethodCreateXmlWriter(Stream^, HttpContent^)

Called during serialization to get the XML writer to use for writing objects to the stream.

System_CAPS_pubmethodEquals(Object^)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_protmethodGetDeserializer(Type^, HttpContent^)

Called during deserialization to get the XML serializer to use for deserializing objects.

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetPerRequestFormatterInstance(Type^, HttpRequestMessage^, MediaTypeHeaderValue^)

Returns a specialized instance of the MediaTypeFormatter that can format a response for the given parameters.(Inherited from MediaTypeFormatter.)

System_CAPS_protmethodGetSerializer(Type^, Object^, HttpContent^)

Called during serialization to get the XML serializer to use for serializing objects.

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodInvokeCreateXmlReader(Stream^, HttpContent^)

This method is to support infrastructure and is not intended to be used directly from your code.

System_CAPS_pubmethodInvokeCreateXmlWriter(Stream^, HttpContent^)

This method is to support infrastructure and is not intended to be used directly from your code.

System_CAPS_pubmethodInvokeGetDeserializer(Type^, HttpContent^)

This method is to support infrastructure and is not intended to be used directly from your code.

System_CAPS_pubmethodInvokeGetSerializer(Type^, Object^, HttpContent^)

This method is to support infrastructure and is not intended to be used directly from your code.

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodReadFromStreamAsync(Type^, Stream^, HttpContent^, IFormatterLogger^)

Called during deserialization to read an object of the specified type from the specified readStream. (Overrides MediaTypeFormatter::ReadFromStreamAsync(Type^, Stream^, HttpContent^, IFormatterLogger^).)

System_CAPS_pubmethodReadFromStreamAsync(Type^, Stream^, HttpContent^, IFormatterLogger^, CancellationToken)

Asynchronously deserializes an object of the specified type.(Inherited from MediaTypeFormatter.)

System_CAPS_pubmethodRemoveSerializer(Type^)

Unregisters the serializer currently associated with the given type.

System_CAPS_pubmethodSelectCharacterEncoding(HttpContentHeaders^)

Determines the best character encoding for reading or writing an HTTP entity body, given a set of content headers.(Inherited from MediaTypeFormatter.)

System_CAPS_pubmethodSetDefaultContentHeaders(Type^, HttpContentHeaders^, MediaTypeHeaderValue^)

Sets the default headers for content that will be formatted using this formatter. This method is called from the ObjectContent constructor. This implementation sets the Content-Type header to the value of mediaType if it is not null. If it is null it sets the Content-Type to the default media type of this formatter. If the Content-Type does not specify a charset it will set it using this formatters configured Encoding. (Inherited from MediaTypeFormatter.)

System_CAPS_pubmethodSetSerializer(Type^, XmlObjectSerializer^)

Registers an XmlObjectSerializer to read or write objects of a specified type.

System_CAPS_pubmethodSetSerializer(Type^, XmlSerializer^)

Registers an XmlSerializer to read or write objects of a specified type.

System_CAPS_pubmethodSetSerializer<T>(XmlObjectSerializer^)

Registers an XmlObjectSerializer to read or write objects of a specified type.

System_CAPS_pubmethodSetSerializer<T>(XmlSerializer^)

Registers an XmlSerializer to read or write objects of a specified type.

System_CAPS_pubmethodToString()

(Inherited from Object.)

System_CAPS_pubmethodWriteToStreamAsync(Type^, Object^, Stream^, HttpContent^, TransportContext^)

Asynchronously writes an object of the specified type.(Inherited from MediaTypeFormatter.)

System_CAPS_pubmethodWriteToStreamAsync(Type^, Object^, Stream^, HttpContent^, TransportContext^, CancellationToken)

Called during serialization to write an object of the specified type to the specified writeStream.(Overrides MediaTypeFormatter::WriteToStreamAsync(Type^, Object^, Stream^, HttpContent^, TransportContext^, CancellationToken).)

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

Return to top
Show: