我正在使用ColdFusion 8。
我正在尝试获取ExhibitorList的BoothID属性和值。这是我的XML:
<ExhibitorList BoothID="164991">
<BoothNumber>N1849</BoothNumber>
<CompanyID>407</CompanyID>
<CompanyNumber>166212</CompanyNumber>
</ExhibitorList>
除了
之外,我成功地得到了我想要的任何东西SoapResponse = xmlParse(httpResponse.fileContent);
ResponseNodes = xmlSearch(SoapResponse, "//*[ local-name() = 'ExhibitorList' ]");
for (i = 1; i lte arrayLen(ResponseNodes); i++) {
BoothNumber = ResponseNodes[i].BoothNumber;
CompanyID = ResponseNodes[i].CompanyID;
CompanyNumber= ResponseNodes[i].CompanyNumber;
BoothID = xmlSearch(ResponseNodes[i], "@BoothID"); // THE TROUBLE IS HERE
}
如何更改这一点以获取BoothID属性和值?
答案 0 :(得分:6)
替换以// BoothID = ResponseNodes[i].XmlAttributes.BoothID;