Rick, does something like this work for you?

<cfset theURL = "http://www.lennox.com/api/v1/z7RRSHM/Categories";>

<cfhttp url="#theURL#" method="GET" result="xmlFeed">
<cfset xmlFeed = xmlParse(theURL)>
<cfset theArray = xmlSearch(xmlFeed, "//*[local-name() = 'Category']") />

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

        <cfoutput>
        Category Name = #replace(theArray[i].CategoryName.xmlText, " : ", "
", "ALL")#<br>
        </cfoutput>

</cfloop>

Hope that helps, Che

-----Original Message-----
From: Rick Faircloth [mailto:[email protected]] 
Sent: Wednesday, January 04, 2012 10:38 AM
To: cf-talk
Subject: Is what I'm trying to do with XML even possible?


Hi, all...

I've been banging my head against this XML wall for over a week now and
either I just don't get it or what I'm trying to do is not possible given
what the vendor is providing.

The vendor of product info provides 3 ways to access product
information:

Categories, Product within those Categories, and each Product's details

Now, if I were pulling this info from a db, I would naturally use loops to
get the categories, products within each categories and products details for
each product.

However I can't see to get this approach to work with info coming from
cfhttp links.

For obtaining all categories, the vendor provides:
http://lennox.com/api/v1/z7RRSHM/Categories/



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349307
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to