首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > XML SOAP >

SelectSingleNode查询时,单引号有关问题

2012-03-06 
SelectSingleNode查询时,单引号问题在使用selectsinglenode进行节点查询的时候SelectSingleNode( ....../

SelectSingleNode查询时,单引号问题
在使用selectsinglenode进行节点查询的时候
SelectSingleNode( "....../DataDescription[@Value= ' "   &   data   &   " '] ")
如果data中含有单引号,就会报错,查询就会出问题。
请问如何处理一下呢?转义?

[解决办法]
Entity Entity Reference Meaning
lt &lt; < (less than)
gt &gt; > (greater than)
amp &amp; & (ampersand)
apos &apos; ' (apostrophe or single quote)
quot &quot; " (double quote)

热点排行