Skip to main content
xPath - Concat() function

Combine strings together

Micah A. Parker avatar
Written by Micah A. Parker
Updated over 2 months ago

Product: Mapping Manager

Article Link:


You can use the concat() function to easily combine multiple nodes into a single text.


Example XML


The below XML example is a snippet of Address Information

<Address>

<ShipTo>

<ShipToCode>STC12345</ShipToCode>

<Name>Receiver Name</Name>

<AddressLine1>789 Receiver Ave</AddressLine1>

<AddressLine2>Suite 100</AddressLine2>

<City>Receiver City</City>

<State>ST</State>

<PostalCode>67890</PostalCode>

<Country>US</Country>

<ContactInformation>

<Phone>123-456-7890</Phone>

<Email>[email protected]</Email>

</ContactInformation>

</ShipTo>

</Address>


Concat() Function


You can use the concat() function to combine multiple nodes into a single result. This can be useful for when your data is located in two different places within the XML - but the Trading Partner wishes to see it together, or you need to key against those fields and wish to combine them for easier formatting.

concat(pathOne,pathTwo,...)

Note: The concat() function requires a minimum of 2 parameters, but can accept more than 2 and it will combine them all together in succession

Combine Name and Ship To Code

You can combine two elements easily simply by defining the path of each one separated by a comma.

concat(ShipTo/Name," - ",ShipTo/ShipToCode)

Receiver Name - STC12345

In the above example, we defined 3 things to combine.

  • <Name>

  • A hardcoded dashed padded with a space on each side

  • <ShipToCode>

rev 10/17/2024

Did this answer your question?