XML Set Attribute

Description

Will add or update an attribute in the XML

Example

Base File


<root>
    <node attr="false">value</node>
</root>

Substitution

New Attribute


<Change type="SetAttribute" xPath="/root/node" attributeName="attrVal" value="true" />

Existing Attribute


<Change type="SetAttribute" xPath="/root/node" attributeName="attr" value="true" />

Output

New Attribute


<root>
    <node attr="false" attrVal="true">value</node>
</root>

Existing Attribute


<root>
    <node attr="true">value</node>
</root>