Get Node List

This activity is used to extract the text from the list of nodes in the xml file.

Technical Reference

 

INPUT

NodeName: Specify the name of the node for which the text has to be extracted.

 

 

 

 

 

 

 

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.

XmlNode: Returns the output of extracted text from the node which can be viewed in an output box.

*Mandatory fields to execute the workflow

Use Case

The following activity illustrates on how we can use the getnodelist activity, to get
 the list of text for the given node.Here we are going to extract the list of text from
 the node “food”  of the given xml file.

Steps to execute the bot

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

2.      Mention the xml path of the file and declare a variable in the output.

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

4.      Double click on the activity and enter the node name from which the text has to be
 extracted.

5.      Declare a variable in the XmlNode box of the output segment. Here it is xmlnode1.

6.      Connect a writelog activity below the Get node activity.

7.      Enter the input string as “xmlnode1(0).innertext” as we need the inner text for the
 given node. If you want the next list to be displayed, we need to enter the input string
 as xmlnode1(1).innertext and so on.

8.      Enter the log level as “info”.

9.      Execute the workflow.

The bot executes the workflow and gives the first list from the xml file.