XML Data Sources

When you create an XML data source, you must use XML as the type of connection and specify the location of the XML document in the connection string.

You can specify the connection string for an XML data source as:

To access a local file, use a file path that uses platform-specific syntax.

To test an XML connection string, you must type the following code at the end of the string:

;VALIDATE=ON

The text of this code is not case sensitive.

You specify connection parameters when you create a data source or modify a data source connection. For more information, see Data Source Creation and Add or Modify a Data Source Connection.

Table 1. XML data source parameters

Parameter

Description

Connection string

Enter the connection string.

Parameterized XML Connection Strings

In an HTTP URL connection string for an XML data source, you can use parameters to send additional information. You can embed a prompt definition string in the parameter component.

If the prompt definition is specified in the report, that value is used. Otherwise, the user is prompted to supply a value. Prompting is not supported for other types of connection strings.

An example of a URL component is addressing_scheme://network_location/path;parameters?query#fragment_identifier

Encode the parameter component with the definition string in between two sets of question marks. A prompt cannot cross a component boundary.

An example of a parameterized XML string is http://My_Network_Location/My_Path/myxml.asp?countryregionsid=??CanadaPrompt??

Parameterized XML connection strings have these restrictions:

  • When a URL component is a prompt, it cannot contain other data.
  • Prompts embedded in XML connection strings do not work in Framework Manager. You cannot import data from a parameterized XML connection string.
  • When you set up a parameterized XML connection string in IBM® Cognos® Connection, the Test button does not work.
  • Validation of the query specification in Report Studio does not work if you are connected to a parameterized XML connection string.