set Element

This topic describes the <set> XML element.

General syntax
<set target="targetname" name="regexp" value="regexp" />
Description Sets an attribute to a value if one exists, if not, adds the attribute and sets the value then.
Attributes

Name Use Annotation
target required The target defining the type of the operation to execute.

Valid values are:

Value Description
attribute Defines to add an attribute.

name required Defines the new name of the target. The value can be either a string or any Regular Expression.
value required Defines the new value of the target. The value can be either a string or any Regular Expression.

Examples
<!-- sets a new attribute named SYMBOL with value 1234 if it does not exist else the value of the 
     attribute is changed to the specified one --> 
<set target="attribute" name="SYMBOL" value="1234" />