Creating a Data Set Using a XML File

You can use an XML file to create a data source.

Do one of the following:

  • Place the XML file in a directory that your administrator has set up as a data source. For more information, see Setting Up a Connection to a File Data Source in Administrator's Guide for Oracle Business Intelligence Publisher.

  • Upload the XML file to the data model from a local directory.

Note:

To use BI Publisher's layout editor and interactive viewer, sample data from the XML file source must be saved to the data model.

About Supported XML Files

Support of XML files as a data set type in BI Publisher follows certain guidelines.

  • The XML files that you use as input to the BI Publisherdata engine must be UTF-8 encoded.

  • Do not use the following characters in XML tag names: ~, !, #, $, %, ^, &, *, +, `, |, :, \", \\, <, >, ?, ,, /. If your data source file contains any of these characters, use the data model editor Structure tab to change the tag names to an acceptable one.

  • Use valid XML files. Oracle provides many utilities and methods for validating XML files.

  • There is no metadata available from XML file data sets, therefore grouping and linking are not supported.

Using a XML File Stored in a File Directory Data Source

Create data sets using XML files stored in file directories.

To create a data set using a XML file from a file directory data source:

  1. On the toolbar, click New Data Set and select XML File. The New Data Set - XML File dialog launches, as shown below.
  2. Enter a name for the data set.
  3. Click Shared to enable the Data Source list. This is the default selected option.
  4. Select the Data Source where the XML file resides. The list is populated from the configured File Data Source connections.
  5. To the right of File Name, click Browse to connect to the data source and browse the available directories. Select the file.
  6. Click OK.
  7. (Required) Save sample data to the data model. See Testing Data Models and Generating Sample Data.

Uploading a XML File Stored Locally

You can create data sets using locally stored XML files.

To create a data set using a XML file stored locally:

  1. On the toolbar, click New Data Set and select XML File. The New Data Set - XML File dialog launches, as shown below.
  2. Enter a name for this data set.
  3. Select Local to enable the Upload button.
  4. Click Upload to browse for and upload the XML file from a local directory. If the file has been uploaded to the data model, then it is available for selection in the File Name List.
  5. Click Upload.
  6. Click OK.
  7. (Required) Save sample data to the data model. See Testing Data Models and Generating Sample Data.

Refreshing and Deleting an Uploaded XML File

You can refresh and delete uploaded local XML files.

After uploading the file, it is displayed on the Properties pane of the data model under the Attachments region, as shown below.

See Setting Data Model Properties for more information about the Properties pane.

To refresh the local file in the data model:

  1. In the component pane, click Data Model to view the Properties page.

  2. In the Attachment region of the page, locate the file in the Data Files list.

  3. Click Refresh.

  4. In the Upload dialog, browse for and upload the latest version of the file. The file must have the same name or it will not replace the older version.

  5. Save the data model.

To delete the local file:

  1. In the component pane, click Data Model to view the Properties page.
  2. In the Attachment region of the page, locate the file in the Data Files list.
  3. Click Delete.
  4. Click OK to confirm.
  5. Save the data model.