Split String in OIC

Suppose you have below XML that you want to parse in XSLT:


<message> <to>1,2,3</to> </message>


To parse (split using ',' ) the <to> element use the below XLST


use the below namespace

 xmlns:str="http://exslt.org/strings"


and then use the below in mapper:

<xsl:value-of select="str:split(/message/to, ',')[1]" />

it will output: 

1





Comments