Execute xpath
Execute xpath activity allows reaching the location of each element or attribution in the .xml file via Xpath and getting desired values.
| *File name | The XML file name is written. |
| *Xml string | If any result is received as an XML string (Not a file with XML content) XML content is written. The other fields, prefixes, etc. XML is written to parse the content. Then, it is ensured that operations can be performed as a dataset. Note: If this field is used, the File name field does not need to be used. |
| *Xpath expression | The Xpath of which element/attribute to be referenced is referenced and the information related to element or attribute is selected by using Filter field. |
| *Filter | The information type (element/attribute) to be accessed within Xpath is entered. In the dropdown menu, two information types (element/attribute) can be selected. |
| Prefix | This is the area where prefixes are defined when using the elements in the XML file. In case more than one prefix is needed, other prefix fields are filled. |
| Uri | To define the first prefix, the URI of the prefix is provided here. |
| Prefix2 | This is the area where prefixes are defined when using the elements in the XML file. |
| Uri2 | To define prefix2, the URI of the prefix is provided here. |
| Prefix3 | This is the area where prefixes are defined when using the elements in the XML file. |
| Uri3 | To define the first prefix3, the URI of the prefix is provided here. |
| *Output dataset | A dataset name is written for the XPath execution result. |
| Delimiter | The delimiter is used to separate the Xpaths when more than one Xpath is used. |
Note: * Fields selected with are required, others are optional
File name example
You can use the File name as shown in the example.
C:UsersAliceDocumentsinvoice.xml
Xml string example
You can use the Xml string as shown in the example.
<string name=”string_name”
text_string </string
Xpath expression example
You can use the Xpath expressions shown in the example.
| |
Filter example
You can use the Filter as shown in the example.
ELEMENT
Let’s use the XPath specified in the example above. This Xpath takes us to the Store_ID element in the tree structure. That is, the address of an element to be reached with XPath. Thus, ELEMENT is selected from the combobox.
Prefix example
You can use the Prefix shown in the example.
ds:Reference
Based on the XML file content above, this field is not filled because there is no prefix for the elements in the .xml file. The prefix is specified in an xml file as follows:
< ds:Reference Id=”Reference-Id-28eeffb3-146c-4a8a-9e12-19541d39ee0e” URI=””>. The prefix of the Reference element in this expression is ‘ds’ .
Prefix2 example
You can use the Prefix2 shown in the example.
cac:AdditionalDocumentReference
Based on the XML file content above, this field is not filled because there is no prefix for the elements in the .xml file. The As in the above mentioned ‘Prefix’ example, if there is another prefix like “ds”, a prefix is written in this field again. Xpath information also varies according to usage.
As can be seen in this example, different prefixes (prefixes) can be included in the .xml file.
Prefix3 example
You can use the Prefix3 shown in the example.
caa:Username
Suppose that the file specified in the prefix2 example also has a field like the following:
If you want to reach this field in the XML file, in addition to the cac and cbc prefixes, the caa prefix is also introduced in this field; Prefix3: becomes caa .
URI example
You can use the URI as shown in the example.
urn: oasis: names: specification: ubl: schema: xsd: CommonAggregateComponents-2
The prefix contains Uri information in the .xml file.
xmlns: cac = “urn: oasis: names: specification: ubl: schema: xsd: CommonAggregateComponents-2” , the area to the left of the equation and in quotes contains the Uri information. When writing the expression Uri, the part between the double quotes is written:
It is shown as urn: oasis: names: specification: ubl: schema: xsd: CommonAggregateComponents-2.
URI2 example
You can use the URI2 as shown in the example.
urn: oasis: names: specification: ubl: schema: xsd: CommonAggregateComponents-2
The prefix contains Uri information in the .xml file.
The field specified in the expression xmlns: ext = “urn: oasis: names: specification: ubl: schema: xsd: CommonExtensionComponents-2” , to the left of the equation, and in quotes contains the Uri information. When writing the expression Uri, the part between the double quotes is written:
It is shown as urn: oasis: names: specification: ubl: schema: xsd: CommonExtensionComponents-2 .
URI3 example
You can use the URI3 as shown in the example.
urn: oasis: names: specification: ubl: schema: xsd: CommonAggregateComponents-2
or Prefix3 defined above, Uri information similar to Uri and Uri2 is written in the specified format.
Output dataset example
You can use the Output dataset as shown in the example.
outputvalue
Delimiter example
You can use the Delimiter as shown in the example.
If a single xpath is used, the Delimiter must not be filled.
If using multiple xpaths;
The sign separating the xpaths must be entered in the Delimiter field.
If xpaths are separated by “,”
,
Note – One and more xpath differences
Single Xpath
More than one Xpath
- Each given xpath is taken as the header and the values are written explicitly line by line.

