Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Correct Format for StructKeyExists

Status
Not open for further replies.

MinalMoe

IS-IT--Management
Mar 25, 2004
62
GB
Using MX7 to check output of XML search.

Not quite sure what the correct code is for the StructKeyExists.

The loop is

<cfloop index="i" from="1" to="#arrayLen(Results)#">

Where the XML for Results is

<cfset results = XmlSearch(FlightXML, "//:packageHoliday")>

where PackageHoliday.Flight.xmlAttributes.Field is the structure.

I used a variation of the following which worked elsewhere, but I realise my coding isn't quite right.

<cfif StructKeyExists(Results["Flight.XmlAttributes"], "ReturnHomeTime")>

Any advise is appreciated - thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top