Ahhhh ... Jim, that did it ... makes me feel like a rookie ;)

Thanks!

Paul Giesenhagen
QuillDesign
417-885-1375
http://www.quilldesign.com


----- Original Message ----- 
From: "Jim Davis" <[EMAIL PROTECTED]>
To: "CF-Talk" <[email protected]>
Sent: Friday, November 04, 2005 3:10 PM
Subject: RE: XML Is or NOT?


>> -----Original Message-----
>> From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]
>> Sent: Friday, November 04, 2005 3:21 PM
>> To: CF-Talk
>> Subject: Re: XML Is or NOT?
>>
>> <cfif IsDefined(XMLResponse.RateV2Response.Package.Error)>
>>
>> Same error
>>
>> Element RATEV2RESPONSE.PACKAGE.ERROR is undefined in XMLRESPONSE
>
> You NEED the quotes, but you DON'T need the pound signs.
>
> IsDefined() takes one parameter - the NAME of a variable (a string).  It
> returns "true" if a variable by that name exists, "false" if not.
>
> So the input has to be a string.
>
> These two lines do EXACTLY the same thing:
>
> <cfif IsDefined(XMLResponse.RateV2Response.Package.Error)>
> <cfif IsDefined("#XMLResponse.RateV2Response.Package.Error#")>
>
> Quotes indicate a string and pound signs distinguish a variable value 
> within
> a string.  So both of these end up trying to get the _value_ of
> XMLResponse.RateV2Response.Package.Error and see if there's a variable by
> that name.
>
> This one however:
>
> <cfif IsDefined("XMLResponse.RateV2Response.Package.Error")>
>
> Will look for that variable name and return whether or not it exists.
>
> It's worth it to check out livedocs.macromedia.com, there's an extensive
> chapter on parsing XML in CF and full documentation for all functions.
>
> Jim Davis
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223287
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to