RWA_TAG_ATTR
Purpose
Uses tag names taken from a
dynamic array
A multi-element string variable in which data is divided into elements by attribute marks, value marks and subvalue marks, matching the structure of a Reality file item. The entire array is referenced and stored as a single variable. For more information, refer to the Reality DataBasic Reference Manual.
to format attributes from a second
dynamic array. For each attribute in the tag list, the corresponding attribute
in the second array is enclosed in a pair of tags of the specified type. Appends
generated code to vString.
Syntax
RWA_TAG_ATTR(vString, aTagList, aAttrList,
Start,
aClass)
Parameters
vString A variable containing the string to which the generated code is
appended. On return, the variable contains the modified string. If the
string does not exist, it is created.
aTagList A
dynamic array
A multi-element string variable in which data is divided into elements by attribute marks, value marks and subvalue marks, matching the structure of a Reality file item. The entire array is referenced and stored as a single variable. For more information, refer to the Reality DataBasic Reference Manual.
containing a list of tag names, one per attribute.
aAttrList A
dynamic array
A multi-element string variable in which data is divided into elements by attribute marks, value marks and subvalue marks, matching the structure of a Reality file item. The entire array is referenced and stored as a single variable. For more information, refer to the Reality DataBasic Reference Manual.
containing a list of attributes to be tagged, one per
attribute.
Start The number of the first attribute in
aAttrList
to be tagged. Item numbering starts from 1.
aClass A
dynamic array
A multi-element string variable in which data is divided into elements by attribute marks, value marks and subvalue marks, matching the structure of a Reality file item. The entire array is referenced and stored as a single variable. For more information, refer to the Reality DataBasic Reference Manual.
that
can be used to set attributes of the tags. For information about using aClass,
see The aClass Parameter.
Example
If TAGS contains the following:
"type":AM:"make":AM:"model":AM:"colour"
and CAR contains the following:
"4-door saloon":AM:"Ford":AM:"Escort":AM:"Blue"
calling
RWA_TAG_ATTR(STRING, TAGS, CAR, 1, "")
appends the following to STRING:
<type>4-door saloon</type>
<make>Ford</make>
<model>Escort</model>
<colour>Blue</colour>