Skip to main content

XmlSerializer

Assembly: ServiceStack.Text.dll
View Source
Declaration
public class XmlSerializer

Fields

XmlWriterSettings

View Source
Declaration
public static readonly XmlWriterSettings XmlWriterSettings

XmlReaderSettings

View Source
Declaration
public static readonly XmlReaderSettings XmlReaderSettings

Instance

View Source
Declaration
public static XmlSerializer Instance

Methods

DeserializeFromString(String, Type)

View Source
Declaration
public static object DeserializeFromString(string xml, Type type)
Returns

System.Object

Parameters
TypeName
System.Stringxml
System.Typetype

DeserializeFromString<T>(String)

View Source
Declaration
public static T DeserializeFromString<T>(string xml)
Returns

<T>

Parameters
TypeName
System.Stringxml
Type Parameters
  • T

DeserializeFromReader<T>(TextReader)

View Source
Declaration
public static T DeserializeFromReader<T>(TextReader reader)
Returns

<T>

Parameters
TypeName
System.IO.TextReaderreader
Type Parameters
  • T

DeserializeFromStream<T>(Stream)

View Source
Declaration
public static T DeserializeFromStream<T>(Stream stream)
Returns

<T>

Parameters
TypeName
System.IO.Streamstream
Type Parameters
  • T

DeserializeFromStream(Type, Stream)

View Source
Declaration
public static object DeserializeFromStream(Type type, Stream stream)
Returns

System.Object

Parameters
TypeName
System.Typetype
System.IO.Streamstream

SerializeToString<T>(T)

View Source
Declaration
public static string SerializeToString<T>(T from)
Returns

System.String

Parameters
TypeName
<T>from
Type Parameters
  • T

SerializeToWriter<T>(T, TextWriter)

View Source
Declaration
public static void SerializeToWriter<T>(T value, TextWriter writer)
Parameters
TypeName
<T>value
System.IO.TextWriterwriter
Type Parameters
  • T

SerializeToStream(Object, Stream)

View Source
Declaration
public static void SerializeToStream(object obj, Stream stream)
Parameters
TypeName
System.Objectobj
System.IO.Streamstream