Table of Contents

Class DotNetXmlSerializer

Namespace
RestSharp.Serializers.Xml
Assembly
RestSharp.dll

Wrapper for System.Xml.Serialization.XmlSerializer.

public class DotNetXmlSerializer : IXmlSerializer, ISerializer
Inheritance
DotNetXmlSerializer
Implements
Inherited Members

Constructors

DotNetXmlSerializer()

Default constructor, does not specify namespace

public DotNetXmlSerializer()

DotNetXmlSerializer(string)

Specify the namespaced to be used when serializing

public DotNetXmlSerializer(string @namespace)

Parameters

namespace string

XML namespace

Properties

ContentType

Content type for serialized content

public string ContentType { get; set; }

Property Value

string

DateFormat

Format string to use when serializing dates

public string? DateFormat { get; set; }

Property Value

string

Encoding

Encoding for serialized content

public Encoding Encoding { get; set; }

Property Value

Encoding

Namespace

XML namespace to use when serializing

public string? Namespace { get; set; }

Property Value

string

RootElement

Name of the root element to use when serializing

public string? RootElement { get; set; }

Property Value

string

Methods

Serialize(object)

Serialize the object as XML

public string Serialize(object obj)

Parameters

obj object

Object to serialize

Returns

string

XML as string