Handlebars Helper Function: buildRowSetFromXml
Loads XML data into a rowset by using an XPath expression.
This helper is available in the Winter ’27 release of Marketing Cloud Next.
| Parameter | Type | Description |
|---|---|---|
xmlData | String | Required. The XML data to parse. |
xpathExpression | String | Required. The XPath expression that selects nodes from xmlData. |
returnEmptyOnError | Boolean | Required. If true, returns an empty rowset when parsing or XPath evaluation fails. If false, throws an exception. Specify as a named parameter. |
The function returns a rowset that contains the XML nodes selected by xpathExpression. Each row includes the node value, XML, and any attributes found in the selected nodes.
This example selects the Flight nodes from an XML string.
The example produces this output: