Apama 10.3 | Apama Documentation | Building and Using Apama Dashboards | Building Dashboard Clients | Using XML Data | XML data format | Scalar data elements
Scalar data elements
Scalar data elements are single values such as a string or number. Scalar data elements are useful for isolating common labels, colors, and similar items in XML resource files that can be shared by multiple dashboard files.
A scalar element is defined in an XML data file with the data tag as follows:
<data key="element_name" value="element_value" />
The key attribute specifies the name of the data element. This name will be used when attaching object properties to the data element. The value specifies the value for the element; both string and number values can be specified for the value.
Following is an example of an XML data file containing scalar data elements:
<?xml version="1.0"?>
<dataset xmlns="www.sl.com" version="1.0">
  <data key="status_label" value="Current Status:" />
  <data key="status_complete" value="Completed" />
  <data key="status_failed" value="Failed" />
  <data key="load_factor" value="1.5" />
  <data key="max_occurence" value="10000" />
Here, five different scalar data elements are defined. The first three, status_label, status_complete, and status_failed, have string values. The last two, load_factor and max_occurence, have number values.

Copyright © 2013-2018 | 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.