开发者

ColdFusion XMLSearch issue

This works:

xmlSearch(开发者_运维技巧thisScheduleXml,"/Schedules/Competition[@id = '58']/Match[@status != 'Complete']")>

This doesn't:

xmlSearch(thisScheduleXml,"/Schedules/Competition[@id = '<cfoutput>#url.competitionID#</cfoutput>']/Match[@status != 'Complete']")>

I don't get an obvious error as such; I just get back an empty struct with the second option.


Try to create the xpath string as a variable like:

<cfset match = "/Schedules/Competition[@id = '#url.competitionID#']/Match[@status != 'Complete']"> 
<cfset xmlSearch(thisScheduleXml,match)>


You can't use a CFOUTPUT tag in a function argument like that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜