XML

Mapper

5min
Document image


The Mapper action is one of the actions at your disposal to work with XML data. Mapper enables you to extract a value from aN XML string or an XML file.

The action will be able to query/extract data from an XML input using an XPath expression and save it to a variable.

Mapper action was previously called XML Mapper.



Overview

The action is used to filter the XML data that we will import into our process for future use.

Input xml string - Input your XML schema in a process variable of type string

Input xml file - Input your XML file in a process variable of type file

Xpath expression - Input XPath expression for obtaining the key value(s) for your XML input

IsList - returns TRUE if the XPath expression returns a list, FALSE otherwise; outputs will be set according to this.

The resulting value - returns a value corresponding to the XPath expression

The resulting list values - returns a list of values corresponding to the XPath expression



How to configure the Mapper action?

1. Create a process and give it a name.

2. Drag the mapper action to the canvas and link it to the other actions.

Document image


3. Create the variables needed for the configuration of the action, and then add them to the configuration panel:

Document image


4. Save, Validate and Run the process.

5. The process will ask for inputs: (see values with example purposes below)

xmlString:

XML


xPath:

XML


6. Click Run.

7. Click Check Instance to view the results. You will see that it selects the first book element that is the child of the bookstore element, and it is saved in the result variable.

Document image




Updated 16 Feb 2024
Doc contributor
Doc contributor
Did this page help you?