日期:2014-05-17  浏览次数:20943 次

一个应该比较简单的问题,但是我不会,又不好搜索,知道的告诉一下吧
我在asp中访问DOM,现在路径中有 ", '符号,该怎么表示这两个符号?
如xpath   =   "//book[name= ' "   &   name " '] ",如何name里有这两个字符,在dom里就找不到节点了,请帮帮忙,thanks.

------解决方案--------------------
name = Replace(name, " " " ", "" ")
name = Replace(name, " ' ", "' ")
xpath = "//book[@name= ' " & name & " '] "

------解决方案--------------------
没弄懂意思,应该是二楼的方法,用实体名代替



--------------------
网络创业任我行
经纬人才网:www.jobokay.com
视频教程网:down.jobokay.com
QQ:7264550
MSN:panepan@msn.com


------解决方案--------------------
name = Replace(name, " " " ", "" ")
name = Replace(name, " ' ", "' ")
xpath = "//book[@name= ' " & name & " '] "