Is there any XPath expression for String Padding in wso2 ESB?

后端 未结 2 2039
予麋鹿
予麋鹿 2020-12-21 05:55

I have enabled XPath 2.0 configuration synapse.xpath.dom.failover.enabled=true in synapse.properties but still unable to get string padding done. I

2条回答
  •  庸人自扰
    2020-12-21 06:37

    The solution from @har07 is fine if you have a reasonable upper bound on the value of n, but if you don't, you can create a string containing '%' repeated $n times using

    XPath 3.0: string-join((1 to $n)!"%")
    
    XPath 2.0: string-join(for $x in 1 to $n return "%", "")
    

提交回复
热议问题