Progress® Telerik® Reporting R3 2020
ReportXmlSerializer.Serialize Method (TextWriter, Object)
Serializes the specified value and writes the XML document to the specified TextWriter.
Namespace:
Telerik.Reporting.XmlSerializationAssembly: Telerik.Reporting (in Telerik.Reporting.dll)
Syntax
Parameters
- writer
- Type: System.IOTextWriter
The TextWriter used to write the XML document. - value
- Type: SystemObject
The value to serialize.
Remarks
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.
Examples
The following examples serializes an object using a TextWriter:
using (System.IO.FileStream fs = new System.IO.FileStream("Report.xml", FileMode.Create)) using (System.IO.TextWriter writer = new System.IO.StreamWriter(fs, System.Text.Encoding.UTF8)) { Telerik.Reporting.XmlSerialization.ReportXmlSerializer xmlSerializer = new Telerik.Reporting.XmlSerialization.ReportXmlSerializer(); xmlSerializer.Serialize(writer, report); }
Version Information
Supported in: 1.0.1