XmlDataSource Class
Wordize.Reporting.XmlDataSource class. Provides access to data of an XML file or stream to be used within a report.
XmlDataSource class
Provides access to data of an XML file or stream to be used within a report.
public class XmlDataSource
Constructors
Name | Description |
---|---|
XmlDataSource(Stream) | Creates a new data source with data from an XML stream using default options for XML data loading. |
XmlDataSource(string) | Creates a new data source with data from an XML file using default options for XML data loading. |
XmlDataSource(Stream, Stream) | Creates a new data source with data from an XML stream using an XML Schema Definition stream. Default options are used for XML data loading. |
XmlDataSource(Stream, XmlDataLoadOptions) | Creates a new data source with data from an XML stream using the specified options for XML data loading. |
XmlDataSource(string, string) | Creates a new data source with data from an XML file using an XML Schema Definition file. Default options are used for XML data loading. |
XmlDataSource(string, XmlDataLoadOptions) | Creates a new data source with data from an XML file using the specified options for XML data loading. |
XmlDataSource(Stream, Stream, XmlDataLoadOptions) | Creates a new data source with data from an XML stream using an XML Schema Definition stream. The specified options are used for XML data loading. |
XmlDataSource(string, string, XmlDataLoadOptions) | Creates a new data source with data from an XML file using an XML Schema Definition file. The specified options are used for XML data loading. |
Examples
Shows how to fill a template from a XML file using LINQ Reporting Engine and save the result to stream.
XmlDataLoadOptions xmlLoadOptions = new XmlDataLoadOptions();
xmlLoadOptions.AlwaysGenerateRootObject = true;
XmlDataSource ds = new XmlDataSource(MyDir + "ReportingData.xml", xmlLoadOptions);
using (Stream input = File.OpenRead(MyDir + "ReportingTemplateForeach.docx"))
using (Stream output = File.Create(ArtifactsDir + "ReportingForeachXmlDataSource.pdf"))
{
ReportBuilder.BuildReport(input, output, SaveFormat.Pdf, ds);
}
See Also
- namespace Wordize.Reporting
- assembly Wordize