toXmlList
Table of Contents
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,
Parameter | Data type | Description |
<variable> | LIST | Variable which will contain the converted list. |
<string> | TEXT | The 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