Thank you for your feedback.
Form temporarily unavailable. Please try again or contact to submit your comments.

XML parser step

Log in to subscribe to topics and get notified when content changes.

XML parser step

Identify structured data from an XML payload without having to write script. Map incoming XML elements to a complex object output that you can use in other steps or actions. At runtime, values from an XML payload populate the complex object output.

To learn more about complex objects, see Complex data.

Note: XML parser step is not available in the base system and requires the ServiceNow® IntegrationHub subscription. After the required plugin is activated, the step is visible under Integrations.

Roles and availability

  • Available as an Action Designer action step. Users with the action_designer role can create a custom action with one or more action steps.

Payload size limit

At runtime, XML parser step supports payloads up to 10 MB. For larger payloads, create a Data Stream action. For more information, see Data Stream actions and pagination.

At design time, XML parser step supports sample payloads up to 64,000 characters.


Field Description
Source data Select or drag a data pill that contains the source XML data. For example, a REST step Response Body data pill. At runtime, values from the data source populate the complex object output.
Payload view Select a view for the example payload.
  • Raw (edit mode): Displays editable XML.
  • Structured: Displays XML in a tree view. Click an element in the tree to copy the element XPath. If creating complex data in the Target field manually, you can paste the XPath into the target XPath field.
Example payload

Enter an example payload to generate a complex object. For example, if parsing the response from a REST API step that returns a list of users, enter the expected XML for a single user. This field accepts XML with the following limitations.

  • XML namespaces are not applied to the complex object. More than one namespace in an XML file is not supported and generates an error message.
  • Multidimensional arrays are not supported.
  • Some special characters are not supported, such as hyphen and period. Double colons (::) are not supported in attribute values.
  • Payloads larger than 64,000 characters cannot be saved and generate an error message. However, if working with a large example, you can generate the complex object and delete the example payload before saving the step.
Generate Target Click to generate a complex object from the example payload. Review and edit the Target field as necessary. Child elements are generated as type String. Alternatively, manually create the target by adding items in the Target field.

View the XML payload as a complex object. Generate structured data by clicking Generate Target, or manually add items. For more information, see Complex data.

Each complex data variable contains this information.

  • Label: Data pill label. By default, the system uses the name of the XML element.
  • Preview: Sample value from the example payload.
  • Type: Data type, which must be String, Object, Array.String, or Array.Object. The top-level item must be an Object.
  • XPath: Path to the element. Modify the XPath to change how source data elements map to complex data variables. If manually adding complex data variables, you can copy the XPath from the Payload view field and paste it in a complex data variable XPath field to ensure the correct hierarchy. Conditional XPath expressions are not supported.

Click Edit Object to:

  • Change the label, internal name, or data type
  • Add or remove complex data variables
  • Mark a variable mandatory