Append Node

This activity is used to append a particular node before or after the specified node.

Technical Reference

 

 

 

INPUT

InsertAt: Specify the node name before or after which the node has to be appended.

InsertLocation: Choose from the drop down if the node has to be inserted before or after the specified node.

NodeData: Mention the output variable of the previous activity which is the input for this activity.

 

 

 

 

 

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

Output: Declare a variable here to see the output of the updated XML file.

Result: Returns the success state of the activity.

*Mandatory fields to execute the workflow

Use Case

The following example illustrates how we can use the append node activity to
append and move the content in the node “from” before the node “to”. Here we
use this with a get node activity to get the details for the specified node and then
use the append node activity to append the content to that node. To save the file
we are using a Save activity. To view the saved file, open the file again and the saved 
content can be seen.

Steps to execute the bot

1.      Drag and drop a get XML object which is the scope for all other activities.

2.      Mention the path of the xml file.

3.      Drag and drop the get node activity into scope.

4.      Double click on the activity and enter the node name from which the text has to
 be extracted. Here it is “from”.

5.      Declare a variable in the Xml node box of the output segment. Here it is “Gnode”.

6.      Connect an append node activity below this and navigate to the property section.

7.      Specify the InsertAt node as “to.”

8.      Choose from the drop down if the extracted node has to be appended before or
 after the given node.

9.      Specify the variable declared in the get node activity in which the details of the
 extracted node have been stored as the node data for the append node activity.

10.   Drag and drop a save xml activity below this activity.

11.   Mention the file path where the file with the appended node must be saved.

12.   Execute the workflow and open the xml to see the file with the appended node.
 

 

The bot executes the workflow and appends the node “from” before the node “to”.