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
stringXML namespace
Properties
ContentType
Content type for serialized content
public string ContentType { get; set; }
Property Value
DateFormat
Format string to use when serializing dates
public string? DateFormat { get; set; }
Property Value
Encoding
Encoding for serialized content
public Encoding Encoding { get; set; }
Property Value
Namespace
XML namespace to use when serializing
public string? Namespace { get; set; }
Property Value
RootElement
Name of the root element to use when serializing
public string? RootElement { get; set; }
Property Value
Methods
Serialize(object)
Serialize the object as XML
public string Serialize(object obj)
Parameters
obj
objectObject to serialize
Returns
- string
XML as string