Back to my AWS work ... using the suggestion of another CF-Talker, I used
"structKeyExists" to test whether a particular XML node existed. That solved
the "isDefined" error problem, but now if the element doesn't exist in the
first result set of the results set, it doesn't exist for any items in the
results set ... a big blank.
This is what I'm using:
if(structKeyExists(AmazonXML.ItemSearchResponse.Items.Item[i],"SalesRank")) {
Book.SalesRank =
AmazonXML.ItemSearchResponse.Items.Item[i].SalesRank.XmlText;
}
else {
Book.SalesRank = '';
}
So, this is where I'm hung up now.
H.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244944
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