Convert XML repeating element into coma separated string in Tibco BW

In some integration requirements, we need to convert xml repeating element into a comma separated string. there are many ways to do this in BW but I am going to explain you the very simple way to do this.

suppose I have following xml schema that return form my DB operation

<?xml version = “1.0” encoding = “UTF-8”?><?xml version = “1.0” encoding = “UTF-8”?><Serials> <SerialNumber>1</SerialNumber> <SerialNumber>2</SerialNumber> <SerialNumber>3</SerialNumber> <SerialNumber>4</SerialNumber> <SerialNumber>7</SerialNumber> <SerialNumber>8</SerialNumber> <SerialNumber>9</SerialNumber> <SerialNumber>10</SerialNumber> <SerialNumber>11</SerialNumber> <SerialNumber>56</SerialNumber> <SerialNumber>89</SerialNumber></Serials>

Now i want to change all above SerialNumber into a one string with coma seperated.

In tibco we have a function

“tib:concat-sequence-format”¬† it concatenates the string value of each node in order using a string separator¬†between entries.

concat -seq-tibco-bw-2concat -seq-tibco-bw-1

concat -seq-tibco-bw-2