How to escape apostrophe in WSO2 property XPath expression

我只是一个虾纸丫 提交于 2019-12-02 02:12:44

问题


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:


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"/>


来源:https://stackoverflow.com/questions/42862240/how-to-escape-apostrophe-in-wso2-property-xpath-expression

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!