我有xml数据XMLData
,类似这样:
<cfset TransactionInformation =
[
{
VariableName = "someData",
XMLLocation="HX5.HTML_Reports.HTML_Report.XMLText",
Value=""
}
]/>
我正在尝试执行以下操作:
<cfloop array="#TransactionInformation#" index="Field" >
<cftry>
<cfset Field['Value'] = "#XMLData[Field['XMLLocation'] ]#" />
<cfcatch>
<!--- some error catching --->
</cfcatch>
<cftry>
</cfloop>
这会引发错误,#XMLData[Field['XMLLocation'] ]#
我认为这不是正确的语法。可以这样做,怎么做?
错误
Element HX5.HTML_Reports.HTML_Report.XMLText is undefined in a Java object of type class coldfusion.xml.XmlNodeList.