C# Xslt文件中的特殊字符

C# Xslt文件中的特殊字符,c#,xml,xslt,xpath,extension-objects,C#,Xml,Xslt,Xpath,Extension Objects,我正在调用扩展对象的一个方法 这是我的方法的签名: public string GetValue(string xPath) { } 这里是我在Xslt文件中称之为的位置: <xsl:value-of select ="crn:GetValue('courier:_application/base:_entity/loan:_applicant/base:_entity/person:_phones/base:SmartRefOfPhoneeJDvviUx[base:_entity/co

我正在调用扩展对象的一个方法

这是我的方法的签名:

public string GetValue(string xPath) { }
这里是我在
Xslt
文件中称之为的位置:

<xsl:value-of select ="crn:GetValue('courier:_application/base:_entity/loan:_applicant/base:_entity/person:_phones/base:SmartRefOfPhoneeJDvviUx[base:_entity/contact:_isMobile/base:_underlyingValue='true']/base:_entity/contact:_secondaryPrefix/base:_underlyingValue')"/>

因为这个角色

[base:_entity/contact:_isMobile/base:_underyingvalue='true']

包含字符,我收到一个错误


Expected token'),找到“true”…isMobile/base:_underyingvalue=”-->true您可以使用XSLT/XML转义机制,即

<xsl:value-of select ="crn:GetValue(&quot;courier:_application/base:_entity/loan:_applicant/base:_entity/person:_phones/base:SmartRefOfPhoneeJDvviUx[base:_entity/contact:_isMobile/base:_underlyingValue='true']/base:_entity/contact:_secondaryPrefix/base:_underlyingValue&quot;)"/>