Trying to access Node with variable in Xml
Posted on 2004-10-07
I am trying to put a variable into some code that is being used to access a node in an Xml Doc. Below is what I am trying but I keep getting an error. I am not sure how to make it work.
<cfset bestPrice = "#XmlRateSheet.investor.products.#ProductCode#.rates.ratesdata.exp2.XmlText#">
As you can see above #ProductCode# is the variable that needs to be introduced in this code as a variable. Any thoughts on how I can work around this? The error is below.
A CFML variable name cannot end with a "." character.
The variable XmlRateSheet.investor.products. ends with a "." character. You must supply an additional structure key or delete the "." character.
The CFML compiler was processing