62.6.1 Using Configuration Variables in XML
The builtin XML parser offers a special mechanism—configuration variables—to reuse and customize content at runtime.
A configuration variable is an RTI-specific construct that you can use in the input XML documents to set placeholders for content that will be expanded at parsing time. Specify a variable as follows:
$(VAR_NAME)
where VAR_NAME is the name that identifies the variable. You can use configuration variables in your XML content as an attribute value and element text. For example:
<element attribute="$(VAR_ATTR)">my expanded $(VAR_TEXT)</element>
The possible ways a variable can be expanded are listed below in precedence order:
1. Process an environment variable such as the following:
export VAR_NAME=my_value
2. Process the <configuration_variables> section, which represents an unbounded list of variable name-value pairs. For example:
<configuration_variables>
<value>
<element>
<name>VAR_NAME</name>
<value>var_value</value>
</element>
...
</value>
</configuration_variables>
These two mechanisms can be used in combination or separately.