The XML Mapper action is one of the actions at your disposal to work with XML data. XML 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.
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 XML Mapper action?
1. Create a process and give it a name.
2. Drag the XML mapper action to the canvas and link it to the other actions.
3. Create the variables needed for the configuration of the action, and then add them to the configuration panel:
4. Save, Validate and Run the process.
5. The process will ask for inputs: (see values with example purposes below)
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.