How to escape apostrophe in WSO2 property XPath ex

2020-04-17 06:36发布

My problem is to quote the values obtained from get-property('cf') in <property expression="fn:concat(get-property('whereConcat'),' AND PA_INATO=', get-property('cf'))" name="whereConcat" scope="default" type="STRING"/>

I have tried in different ways(character encoding:&apos;, character escape: \') but without success.

1条回答
叛逆
2楼-- · 2020-04-17 07:28

the cleanest way is to define a constant:

<property name="apos" scope="default" type="STRING" value="'"/>

and then use it as follow:

<property expression="fn:concat(get-property('whereConcat'),' AND PA_INATO=',get-property('apos'), get-property('cf'),get-property('apos'))" name="whereConcat" scope="default" type="STRING"/>
查看更多
登录 后发表回答