如何在WSO2属性XPath表达式中避免撇号 [英] How to escape apostrophe in WSO2 property XPath expression
本文介绍了如何在WSO2属性XPath表达式中避免撇号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的问题是在
p>
< property expression =fn:concat(get-)中引用 get-property('cf')属性('whereConcat'),'AND PA_INATO =',get-property('cf'))name =whereConcatscope =defaulttype =STRING/>
我尝试过不同的方式(字符编码:&'/ code>,字符转义:
\'
),但没有成功。
解决方案
最干净的方法是定义一个常量: / p>
< property name =scope =defaulttype =STRINGvalue ='/>
然后使用如下:
< property expression =fn:concat(get-property('whereConcat'),'AND PA_INATO =',get-property(''),get-property '),get-property(''))name =whereConcatscope =defaulttype =STRING/>
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:'
, character escape: \'
) but without success.
解决方案
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"/>
这篇关于如何在WSO2属性XPath表达式中避免撇号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文