XML value not reading correctly
I am trying to read an XML response after passing data to a 3rd party server and receiving a reply then act appropriately upon the value of a field (response)
The problem is that when I have my CFIF statement, the logic seems to be backwards, if it equals FAIL then I cfabort, but only if I use CFIF NOT does it then cfabort, this is not right at all
As the code stands, the CFIF the value of response IS fail it should CFABORT, but it doesn't
Below is the code, and also a CFDUMP, anybody any ideas?
Thanks
Mark
| xml document [short version] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| XmlComment | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| XmlRoot |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| iimobileengine |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<cfset myxml=XMLParse(#cfhttp.filecontent#)>
<CFDUMP VAR="#myxml#">
<!--- CHECK FOR FAIL RESPONSE --->
<CFIF #myxml.iimobileengine.response# IS "FAIL">
<CFOUTPUT>Stage 1: #myxml.iimobileengine.reason#</CFOUTPUT>
<CFABORT>
</CFIF>
