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

BuildRowSetFromXML(1, 2, 3)

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.

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

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

  • 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: