Apama 10.3.1 | Apama Documentation | Building and Using Apama Dashboards | Building Dashboard Clients | Using XML Data | Defining an XML data source
 
Defining an XML data source
* To attach object properties to data elements in an XML data file, you need to first make the XML data file known by adding it as a data source
1. Select Options... from the Tools menu. This will display the Application Options dialog.
2. In the Application Options dialog select XML in the left pane.
On this tab you can define the XML files to be used as data sources. The XML Source Prefix field allows you to define a file path prefix that can be used to locate XML data files.
3. Set the XML Source Prefix field to the directory of the tutorial sample in your Apama installation. By default this is:
%APAMA_HOME%\samples\dashboard_studio\tutorial\
Be sure to include the final backslash in the XML Source Prefix.
4. Click the Add button to define a new XML data source.
This will display the Edit XML Source dialog.
5. Define a new data source as follows and click the OK button.
You have defined the XML data source named xml data. The data for this data source is in the file tutorial-xml-data.xml located in the tutorial directory.
When defining an XML data source you specify:
*XML Source Name — The name you will use to refer to the data source when defining data attachments.
*XML Source Path — The full path to the XML data file. If an XML source prefix is used, a partial path only need be specified.
*Use XML Source Prefix — If enabled, the XML source prefix will be affixed to the XML source path.
*Static — If enabled Apama will read the file only once. If disabled, Apama will read the file each time it is modified. Each time the file is read any attached objects will update to show the latest data elements in the file.
*Contains Substitutions — Enable this option if the XML source path contains substitution variables. If enabled, Apama will not read the file until the substitutions have been defined.
To edit an existing XML data source, double-click it in the list of XML sources. You can also specify an XML data source to use as the default when defining XML data attachments.
XML data source definitions are saved in OPTIONS.ini. To persist an XML data source definition you must click Save in the Application Options dialog.

Copyright © 2013-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.