Table of Contents

Class XmlConverter

Namespace
Cuemon.Xml.Serialization.Converters
Assembly
Cuemon.Xml.dll

Converts an object to or from XML.

public abstract class XmlConverter
Inheritance
Object
XmlConverter
Derived

Constructors

XmlConverter()

Initializes a new instance of the XmlConverter class.

protected XmlConverter()

Properties

CanRead

Gets a value indicating whether this XmlConverter can read XML.

public virtual bool CanRead { get; }

Property Value

Boolean

true if this XmlConverter can read XML; otherwise, false.

CanWrite

Gets a value indicating whether this XmlConverter can write XML.

public virtual bool CanWrite { get; }

Property Value

Boolean

true if this XmlConverter can write XML; otherwise, false.

Methods

CanConvert(Type)

Determines whether this instance can convert the specified object type.

public abstract bool CanConvert(Type objectType)

Parameters

objectType Type

The System.Type of the object.

Returns

Boolean

true if this instance can convert the specified object type; otherwise, false.

ReadXml(XmlReader, Type)

Reads the XML representation of the objectType.

public abstract object ReadXml(XmlReader reader, Type objectType)

Parameters

reader XmlReader

The System.Xml.XmlReader to read from.

objectType Type

The System.Type of the object.

Returns

Object

An object of objectType.

WriteXml(XmlWriter, Object, XmlQualifiedEntity)

Writes the XML representation of the value.

public abstract void WriteXml(XmlWriter writer, object value, XmlQualifiedEntity elementName = null)

Parameters

writer XmlWriter

The System.Xml.XmlWriter to write to.

value Object

The object to serialize.

elementName XmlQualifiedEntity

The element name to encapsulate around value.