Skip to main content

Parse field as XML string

Mapping XML Attributes and Elements

To clarify the distinction between XML attributes and elements in the message mapper, follow these conventions:

  • XML Attributes: Prefix the key name with an @ (at) sign.
  • XML Elements: Key names are defined without an @ (at) sign.
  • XML Elements with Text Content: If an XML element has both attributes and a text value, use a subkey named "TEXT_CONTENT" to indicate the text value.

Configuration

AttributeRequiredDescription
fromYesDefines the field name before mapping.
toYesDefines the field name after mapping.
Function typeYesDefines the Function type of mapping. Needs to be "String functions".
functionYesDefines the type of mapping. Needs to be "Parse field as XML string".
precedenceNoDefines the precedence used when mapping.
ScriptNoOptional XSLT to interpret the XML string.

Example

Mapper Configuration:

The following example shows how to parse an XML string into message fields.

XML eg 1

In the following example, we use XSLT to transform the same XML into HTML, before it is displayed in a browser.

XML eg 2