Connect to XML data source
The XML data source in the Bold Reports® Web Report Designer retrieves data from an XML file, a string in XML format, or an external URL so you can use it in reports.
How do I create an XML data source?
You create an XML data source from the Data panel of the Bold Reports® Web Report Designer. Follow these steps:
- Click the Data icon in the configuration panel.

- In the
DATAconfiguration panel, click theNEW DATAbutton.
- In the connection type panel, choose the
XMLdata source type.
- Specify the data source name without special characters in the Name field.

Which XML source types can I use?
The Bold Reports® XML data source connects to XML data using the following three options:
- Inline - Inline data.
- File Path - Load from disk.
- External - Load from external URL.

How do I use inline XML data?
You use inline XML data by pasting an XML string into the Inline text area of the XML data source.
-
Choose
Inlinein theTypedrop-down. -
Specify a string that contains XML data in the
Inlinetext area.<?xml version="1.0" encoding="UTF-8"?> <root> <element> <FirstName>First Name 1</FirstName> <ID>1</ID> <IDBook>1</IDBook> <LastName>Last Name 1</LastName> </element> <element> <FirstName>First Name 2</FirstName> <ID>2</ID> <IDBook>1</IDBook> <LastName>Last Name 2</LastName> </element> </root> -
Click
Connectto open the query design pane. The left pane of the query design pane shows the structure of the XML data.
-
Drag the table from the left pane to the query design view and execute it.

-
Click
Finishto save the data source with a relevant name and continue designing the report.
How do I load XML data from disk?
You load XML data from disk by choosing the File type and uploading an XML file to the Web Report Designer.
- Choose the
Fileoption in theTypefield. The upload option appears, as shown below.
- Click the three-dotted button to open the upload box. Browse to the XML file and click open.

- Click
Connectto open the query design pane.
- Review the left pane of the query design pane, which shows the structure of the XML data.

- Drag the table from the left pane to the query design view and execute it.

- Click
Finishto save the data source with a relevant name and continue designing the report.
How do I load XML data from an external URL?
You load XML data from an external URL by choosing the External type and entering the URL in the XML data source.
- Choose the
Externaloption in theTypefield.
- Specify an external URL in the
Externaltext area.
- Click
Connectto open the query design pane. The left pane of the query design pane shows the structure of the XML data. - Drag the table from the left pane to the query design view and execute it.

- Click
Finishto save the data source with a relevant name and continue designing the report.
Note:
- In schema tree, the nested fields in the XML data will be shown as flat structure.
- When the XML data contains duplicate key names at different levels, Bold Reports® ensures uniqueness and avoids conflicts by appending the parent keys to each field name using the following format:
<fieldName>__<topLevelParentKey>_<nextParentKey>_..._<immediateParentKey>_.
Frequently asked questions
How are nested XML fields shown in the schema tree?
The Bold Reports® Web Report Designer shows nested fields in the XML data as a flat structure in the schema tree.
What happens when XML data has duplicate key names?
Bold Reports® appends the parent keys to each field name to keep names unique and avoid conflicts.