Latest News

the latest news from our team

Count the Number of Elements in an XML Variable

Complete these steps to count the number of lines in an XML array variable:

  1. Create a variable to hold the value.
  2. Create a LoadFromXML procedure by right clicking the form > Add Post-condition Procedure > Load Variable from XML Node.
  3. Name the procedure, and in the Use variable field, select the variable from Step 1. Click OK.
  4. The Load from XML window opens. In the Source data area, click From variable and select the variable that contains the XML.
  5. In the Source node area and the Data Node field, specify the data node above the node you want to count. For example, root/Orders/.
  6. In the Transfer method field, select Count of child elements.
  7. In the Node Filter field, specify the node to count. For example, Items.
  8. In the Result area, select the variable from Step 1. Click OK.
  9. Verify the results and save your updated project.

Leave a Reply

Your email address will not be published. Required fields are marked *