Articles on: Administration

Configure Flow: XML parser

Configure Flow: XML parser

To use data from an XML document within the flow, you can use the XML parser to specify your own variables, which are searched for and saved in the transferred XML document.

For frequent use, we offer ready-made configurations as templates, which you can select by clicking on the book symbol.

Each variable receives a user-defined name and the path to the desired data in the XML document.

Use only ASCII characters for the variable name.

In addition, you can specify whether a variable is mandatory. If this is not found in the XML document, the flow terminates with a corresponding error message and does not execute any further functions.

In addition, you can specify whether the result of the queried path is to be treated as a list or as a single value.
Lists are provided with the separator ; and can be further used by the text parser.

When querying a single value, only the first result found is used, even if several would be available.

For the required path, use the query language XPath (XML Path Language), which we briefly demonstrate in the following example. A complete documentation on the syntax can be found, for example, here or here.

XML document

<?xml version="1.0" encoding="UTF-8"?>
<Table name="Operationdata BKS">
<Data type="STRING" header="Operationnumber" />
<Data type="STRING" header="Date" />
<Data type="STRING" header="Reporting party" />
<Data type="STRING" header="Telephone number of the reporting party" />
<Data type="STRING" header="Reporting route" />
<Data type="STRING" header="Catchword" />
<Data type="STRING" header="Message image" />
<Data type="STRING" header="Location" />
<Data type="STRING" header="District" />
<Data type="STRING" header="Street" />
<Data type="STRING" header="House number" />
<Data type="STRING" header="Object" />
<Data type="STRING" header="Subobject" />
<Data type="STRING" header="Location suffix" />
<Data type="STRING" header="RemarkLocation" />
<Data type="STRING" header="RemarkCauseOfOperation" />
<Data type="STRING" header="Return call number" />
<Data type="STRING" header="Return call remark" />
<Data type="STRING" header="Hazard alarm system" />
<Data type="STRING" header="Operation plan info" />
<Data type="STRING" header="Infotext" />
<Data type="STRING" header="PLZ" />
<Column value="1200134527" />
<Column value="21.12.2020" />
<Column value="Mr Steve Svenson" />
<Column value="015154984654" />
<Column value="Emergency call 112" />
<Column value="H2.03" />
<Column value="VU Person trapped" />
<Column value="Sample city" />
<Column value="Innercity-West" /> />
<Column value="Am Gerstel" />
<Column value="17" />
<Column value="SO Sampleobjekt" />
<Column value="" />
<Column value="on the 1st floor" />
<Column value="Approach through backyard" />
<Column value="unclear smoke development" />
<Column value="01519898798" />
<Column value="girlfriend's number" />
<Column value="" />
<Column value="" />
<Column value="" />
<Column value="76829" />
<Table name="Deployment codes">
<Data type="STRING" header="OperationcodeRD" />
<Data type="STRING" header="OperationcodeRDescription" />
<Column value="600" />
<Column value="Opertion code FF" />
<Column value="878" />
<Column value="Sample operation code2" />
<Column value="886" />
<Column value="Design application code3" />
<Table name="Patients">
<Data type="STRING" header="Name" />
<Data type="STRING" header="First name" />
<Column value="Example" />
<Column value="Max" />
<Column value="Example" />
<Column value="Erica" />

SyntaxOutput in list form?Result
/Table[1]/@nameneinOperationdata BKS
/Table[1]/Row[2]/Column[count(//Table[1]/Data[header='Alarmpicture']/preceding-sibling: : Data)+1]/@valuenoVU Person trapped

Updated on: 28/02/2023

Was this article helpful?

Share your feedback


Thank you!