BuildRowSetFromXML

Overview

Creates a rowset from XML. This function can return an empty rowset on error. This function is for use at send time only.

Syntax

BuildRowSetFromXML(1, 2, 3)

Function Properties

OrdinalTypeDescription
1stringRequiredXML within the node
2stringRequiredXPATH argument that specifies the XML node for use in building the rowset
3booleanRequiredIndicates whether to return an empty rowset on error. A value of 0 does not return an empty rowset. A value of 1 returns an empty rowset.

Usage

Review this standard for additional information on XPATH. We recommend also reviewing the Rowset information in the AMPscript Language Elemets document.

Rowset Content

Value includes the value of any element nodes. This value returns empty for these nodes:

  • CDATA
  • Comment
  • Document
  • Document Fragments
  • DocumentType
  • Entities
  • Entity References
  • Notation
  • ProcessingInformation
  • Whitespace
  • XmlDeclaration

XML includes any XML contained within the node and will appear empty if the node does not contain XML. The rowset also provides a column for each attribute found in any of the nodes. If a node is missing a value for that attribute, the rowset includes an empty value.

Given the @xml variable contains this text:

Using this function call:

The system returns this rowset:

ValueXmlOrigin_attDest_attCarrier_att
100.00100.00INDNYC''
200.00200.00INDLAXUAL
500.0025INDSEA''