set Element

This topic describes the <set> XML element.

General syntax
<set target="targetname" name="regexp" value="regexp" />
DescriptionSets an attribute to a value if exists, if not adds the attribute and sets the value then.
AttributesNameUseAnnotation
targetrequiredThe target defining the type of the operation to execute.

Valid values are:

ValueDescription
attributeDefines to add an attribute.

namerequiredDefines the new name of the target. The value can be either a string or any Regular Expression.
valuerequiredDefines 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" />