-----Original Message-----
From: Josh Nathanson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 29, 2006 2:03 PM
To: CF-Talk
Subject: Re: If the structure exists, otherwise ... consistency needed

I think you may want:

if(structKeyExists(AmazonXML.ItemLookupResponse.Items.Item.ItemAttributes, 
"Author"))

{
Book.Author 
=AmazonXML.ItemLookupResponse.Items.Item.ItemAttributes.Author.XmlText;
}

How about giving that a try...

-- Josh

--------------------

Josh,

That was a real promising response, because it worked on my single-item test
query, but on the multiple item code that I really need to have work, it
doesn't.

The following line throws the error that follows:

if(structKeyExists(AmazonXML.ItemSearchResponse.Items.Item[i].SmallImage,"UR
L"))

"Element SMALLIMAGE is undefined in a Java object of type class
coldfusion.xml.XmlNodeMap "

Which is why I had switched the reference to:

 
if(structKeyExists(AmazonXML.ItemSearchResponse.Items.Item[i],"SmallImage.UR
L"))


which always returns false.

H.






~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:245104
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to