ReportXmlSerializer
Serializes and deserializes objects into and from XML. This class is dedicated for serializing and deserializing objects only from the Telerik.Reporting namespace.
Definition
Namespace:Telerik.Reporting.XmlSerialization
Assembly:Telerik.Reporting.dll
Syntax:
public class ReportXmlSerializer
Inheritance: objectReportXmlSerializer
Constructors
Initializes a new instance of the ReportXmlSerializer class.
public ReportXmlSerializer()
Methods
Deserialize(Stream)
object
Deserializes the XML document contained by the specified Stream.
public object Deserialize(Stream stream)
The Stream that contains the XML document to deserialize.
Returns:object
The Telerik.Reporting object being deserialized.
Use the stream parameter to specify an object that derives from the Stream class, which is designed to write to streams. Classes that derive from the Stream class include: BufferedStream, FileStream, MemoryStream, etc.
Deserialize(string)
object
Deserializes the XML document from the specified URI.
public object Deserialize(string inputUri)
The URI for the file containing the XML data.
Returns:object
The Telerik.Reporting object being deserialized.
Deserialize(TextReader)
object
Deserializes the XML document contained by the specified TextReader.
public object Deserialize(TextReader reader)
The TextReader that contains the XML document to deserialize.
Returns:object
The Telerik.Reporting object being deserialized.
Classes that inherit from TextReader include StringReader and StreamReader. If you are using a StreamReader to deserialize an object, you must construct the StreamReader with an appropriate Encoding. The encoding specified by the XML document is ignored.
Deserialize(XmlReader)
object
Deserializes the XML document contained by the specified XmlReader.
public object Deserialize(XmlReader reader)
The XmlReader that contains the XML document to deserialize.
Returns:object
The Telerik.Reporting object being deserialized.
Serializes the specified value and writes the XML document to the specified Stream.
public void Serialize(Stream stream, object value)
The Stream used to write the XML document.
valueobjectThe value to serialize.
Use the stream parameter to specify an object that derives from the abstract Stream class. Classes that derive from the Stream class include: BufferedStream, FileStream, MemoryStream, etc.
Serializes the specified value and writes the XML document to a file with the specified file name.
public void Serialize(string fileName, object value)
The file which you want to write to. The ReportXmlSerializer creates a file at the specified path and writes to it in XML 1.0 text syntax. The fileName must be a file system path.
valueobjectThe value to serialize.
Serializes the specified value and writes the XML document to the specified TextWriter.
public void Serialize(TextWriter writer, object value)
The TextWriter used to write the XML document.
valueobjectThe value to serialize.
In the textWriter parameter, specify an object that derives from the abstract TextWriter class. Classes that derive from the TextWriter class include: StreamWriter, StringWriter, etc.
Serializes the specified value and writes the XML document to the specified XmlWriter.
public void Serialize(XmlWriter writer, object value)
The XmlWriter used to write the XML document.
valueobjectThe value to serialize.
In the xmlWriter parameter, specify an object that derives from the abstract XmlWriter class. For example you can use the XmlTextWriter class.