Add Attribute Action

The Add Attribute action allows you to add an attribute to a specific Xml element.  To use this action you provide a path to an existing Xml Document by selecting from a list of known folders on the client target and then providing a sub path and file name.  If the attribute already exists, the value will be modified to match the configured setting.

You then provide an XPath expression to identify the element that the new attribute will be added to.  If more than one element matches the XPath expression, you can choose one of five actions:

You provide the name and value of the new attribute and it is added to the element based on the setting above.

 

Prepare Stage

Verifies permissions to modify the xml file.

Execute Stage

Backs up the xml file then inserts the new xml attribute, performing the operation as defined by the action properties.

Cleanup Stage

Removes the backup file created during the execute stage.

Rollback Stage

Restores the xml file with the file backed up in the execute stage.

 

Add Xml Attribute Action Editor

Action description – Descriptive text that can be used to identify this particular action in the Actions list.

 

Target client folder – The folder on the client where the xml file that is to be edited is located.

 

Subdirectories – The directory below the designated client root folder to find the xml file that is to be edited.

 

XML file to edit – The name of the xml file that is to be edited.

 

XPath query to select the element into which to add the attribute – Use an XPath expression to identify the node within the xml file that you want to add an attribute to.

 

New attribute name and value – Type the name and value of the new Xml Attribute that you want to add.

 

If multiple elements are found – Identify the action that you want to occur in the event that multiple xml elements are returned by your XPath expression.  You can choose to:

 

Expansion variables can be used to set target client subdirectory, file name of the xml file to edit, Xpath query, attribute name, and attribute value.