Thanks All, got it to work.  Here's the solution I used (Thanks to Matt M.)
<!--- variable for input use from a submitted form -- hard coded for testing--->
<cfset cityName = "seattle">
<cfhttp url="http://xoap.weather.com/search/search?where=#cityName#";
result="CityResponse">
<cfset xmlResultCity = xmlParse(CityResponse.fileContent)>
<!--- gets city name from xml --->
<cfset cityNameSearch = xmlSearch(xmlResultCity, "//*[local-name()='loc']") >
<!--- gets locator ID from xml --->
<cfset cityIDSearch = xmlSearch(xmlResultCity, "//*[local-name()='loc']/@id") >
<cfoutput>
  <cfloop index="i" from="1" to="#arrayLen(cityNameSearch)#">
        <li>#cityNameSearch[i].XmlText#</li>
        <li>#cityNameSearch[i].XmlAttributes.id#</li>
  </cfloop>
</cfoutput>

>Joel,
>
>Try this:
>
><cfset theCities = arrayLen(xmlResultCity.search["loc"])>
>
>Dave
>
>Hi. The posting seems to have break in the sample url try this for a sample
>xml:
>http://xoap.weather.com/search/search?where=florida
>
>When I output "theCities" using the above url, it returns 1. It's should be
>2. It seems like it's not doing the loop.
>
>- JOEL 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:3869
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to