使用“-”从 coldfusion 中的 xml 文档中获取值
Fetching a value from an xml doc in coldfusion with a "-"
我使用 cfhttp 从 Web 服务获取 xml 文档,并将其解析为:
<cfset responseXML = xmlParse(toString(httpResponse.fileContent))>
一切都很好,直到我遇到他们的 xml 标签之一:
<cfset strReturned = #responseXML.POSITION-TITLE.XMLText# >
我收到一个冷融合错误,指出发现了无效的结构,原因是 - 。我怎样才能得到这个值?
尝试使用引号:
responseXML["POSITION-TITLE"].XmlText
我使用 cfhttp 从 Web 服务获取 xml 文档,并将其解析为:
<cfset responseXML = xmlParse(toString(httpResponse.fileContent))>
一切都很好,直到我遇到他们的 xml 标签之一:
<cfset strReturned = #responseXML.POSITION-TITLE.XMLText# >
我收到一个冷融合错误,指出发现了无效的结构,原因是 - 。我怎样才能得到这个值?
尝试使用引号:
responseXML["POSITION-TITLE"].XmlText