XdmSerializationSettings.MediaType PropertyXdmSerializationSettings.MediaType PropertyXdmSerializationSettings::MediaType Property

Gets a string specifying the media type (MIME content type) [RFC2046] of the output.

Syntax

Public Property MediaType As String
        Get
        Set(ByVal value As String)
public string MediaType { get; set; }
public:
property String^ MediaType {
    String^ get();
    void set(String^ value);
}
 

Property Value

Type: System.StringSystem.StringSystem::String^

The media type of the output.

Exceptions

ExceptionCondition
XdmExceptionXdmExceptionXdmException An SEPM0016 error may be raised if an invalid media-type setting is attempted.

Remarks

This property corresponds to the media-type serialization parameter.

The charset parameter of the media type must not be specified explicitly in the value of the media-type parameter, instead it should be set via the EncodingEncodingEncoding property. This is used in the content-type declaration if the include-content-type parameter is set to yes, and it may be used to annotate the output of the serializer, for example in an HTTP request. If this parameter has not been set then the default media type for the output method is used.