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.
精彩评论