join

The join function is used to concatenate the text values of a list of XML nodes.

Syntax

c4i:join(xpath, separator)

Parameters

xpath

XPath to a list of XML nodes

separator

A string to separate the text values

Return value

A string

Examples

Given the following STEP XML:

<STEP-ProductInformation>
    <AttributeList>
        <Attribute ID="ATT1">
            <Validation BaseType="text"/>
        </Attribute>
        <Attribute ID="ATT2">
            <Validation BaseType="number"/>
        </Attribute>
    </AttributeList>
    <Products>
        <Product ID="PRD1">
            <Values>
                <Value AttributeID="ATT1">Test</Value>
                <Value AttributeID="ATT2">16</Value>
            </Values>
        </Product>
    </Products>
</STEP-ProductInformation>

The following YAML configuration will produce the following output

c4i:join(Values/Value, ", ")
"Test, 16"
Last Updated: