This activity is used to set value to a specific node in an XML file.
Technical Reference
INPUT |
InputString: Specify the text that has to set to the specific node. |
|
NodeName: Specify the node name in which the text has to be set. |
||
MISC |
DisplayName: Displays the name of the activity. You can also customize the activity name to help troubleshoot issues faster. This name will be used for logging purposes. |
|
SkipOnError: It specifies whether to continue executing the workflow even if it throws an error. This supports only Boolean value “True or False”. By default, it is set to “False.” True: Continues the workflow to the next step False: Stops the workflow and throws an error. |
||
Version: It specifies the version of the XML automation feature in use |
||
OUTPUT |
Result: Returns the success state of the activity. |
*Mandatory fields to execute the workflow
The following activity illustrates on how we can use the set node activity to set the
text as “Waffles with Belgian Sauce” in the node “name”of the xml file and see the
output.
Example
1. Drag and drop a get XML object activity to the workflow which is the scope.
2. Fill in the required details.
3. Declare the variable as xmldoc in the xmldocument box of the output segment of
the get xml object activity.
4. Drag and drop a set node activity within the scope.
5. Specify the input string as “Waffles with Belgian Sauce” , which is text to be set
for the node.
6. Specify the node to which the above text has to be set. Here it is “name”.
7. To see the output, we need to drag and drop a writelog activity outside the scope,
since the variable in the set node activity gives only a Boolean value.
8. Click on the writelog activity and enter the input string as the variable declared for
the getxmlobject.innerxml, since the setnode activity is within the scope. Here it is
xmldoc.innerxml
9. Execute the activity.
The bot executes the activity and sets the Waffles with Belgian Sauce in the
given node. If you wish to save this to the file, use the save activity from XML
automation.