Choose where you’d like to start

toXmlList

Overview

The toXmlList function takes an XML text, and returns the elements of the specified key or the specified xPath (using executeXpath) as a list.

Return Type

  • LIST

Syntax

<variable> = <text>.toXmlList();

where,

ParameterData typeDescription
<variable>LISTVariable which will contain the converted list.
<string>TEXTThe XML text whose elements will be returned as a list.

Examples

 xmlResponse = invokeurl
 [
     url: "https://www.w3schools.com/xml/cd_catalog.xml"
     type: GET
 ]; // gets an XML response
 info xmlResponse.executexpath("/CATALOG/CD").toXmlList(); // converts the elements in the given node into a list

Get Started Now

Execute