In This Topic
This article explains connecting a or an report to an XML data source.
Connect to an XML Data Source
- In the Report Explorer, right-click the Data Sources node and select the Add Data Source option or click the Add button and select the Data Source option.
- In the Report Data Source dialog that appears, select the General page and enter the data source name in the Name field. By default, the data source name is set to DataSource1. This name appears as a child node to the Data Sources node in the Report Explorer.
- Under the Type field, select Xml Provider.

- In the Connection Properties tab, select the type of XML data as an External file or URL.
- Click the dropdown next to the Select or type the file name or URL field and select the <Browse...> option to specify the xml file path. For example, you can connect to the Factbook.xml sample data source which can be downloaded from GitHub.
The Connection String tab displays the generated connection string as shown below:
xmldoc=C:\Factbook.xml
For more information, see the Configuration Properties for XML Data Source section.
- Verify the generated connection string by clicking the Validate DataSource icon
.
- Click the OK button to save the changes.
Configuration Settings for XML Data Source
The XML Data Provider provides the following configuration settings in the Report Data Source dialog.
The
Connection Properties tab describes the type of xml data you want to use for connecting to a data source. You can also specify an XSLT file to apply to the XML data.
- External file or URL: This field requires you to enter the path of an external XML source such as a local file or the http location of a file.
- Embedded: This field requires you to enter the path of the XML file to embed in the report. You can also enter the data manually or edit the data in the selected XML file.
- Expression: This field requires you to enter the path expression. Users can also enter the path expression in the connection string.
The
Connection String tab displays the XML connection string based on the defined configuration settings in the
Connection Properties tab.
Note that elements in the connection string must be terminated with a semicolon (;) character.