Apama 10.15.0 | Building and Using Apama Dashboards | Building Dashboard Clients | Using XML Data | Attaching objects to XML data
 
Attaching objects to XML data
After having defined an XML data source you can attach object properties to the data elements within the XML data file. The steps for doing this are similar to defining attachments to the instance data.
*To attached object properties to the data elements within the XML data file
1. If you have not yet done so, define the XML data source xml data as detailed in the previous section.
2. Open the file tutorial-xml-data.rtv by selecting XML Data on the tutorial main page.
Illustration showing a table object
The table object in this dashboard is attached to the production_table data element in the file tutorial-xml-data.xml.
3. Open the file tutorial-xml-data.xml in a text editor and examine it to see that there is a column in the table for each column defined for production_table and that there is a row in the table for each row defined.
4. Select the table object and double-click the valueTable property in the Object Properties panel.
Illustration showing how the valueTable property is defined
Here the property is attached to the production_table data element for the XML data source named xml data. The Columns and Filter fields can be used to select a subset of columns or rows as is done for the instance data attachments.
5. With the table object still selected, right-click the label property and select XML from the Attach to Data menu.
Illustration showing the menu
6. If label is a scalar property, it must be attached to a scalar data element. Attach it to the data element string_element as shown in the following:
Illustration showing how the label property is defined
Do not use the Data server field of the Attach to XML Data dialog.
The label of the table will change.
Illustration showing the table