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 >http://xoap.weather.com/search/search?where=new seems to be protected. > >Output theCities. What do you get? > >Post the XML your using. > >Adrian > >HELP! What's missing?? the loop isn't working. It only returns the first >element. >source url for the loop is http://xoap.weather.com/search/search?where=new >york > >Thanks in advance.. >Joel > > >++++++++++++++ > ><cfhttp url="http://xoap.weather.com/search/search?where=new york" >result="CityResponse"> ><cfset xmlResultCity = xmlParse(CityResponse.fileContent)> ><!--- Ok, now show them all ---> ><cfoutput> > <cfset theCities = arrayLen(xmlResultCity)> > <cfset theCitiesCount = arrayNew(1)> > <cfloop index="x" from="1" to="#theCities#"> > <cfset cities = structNew()> > <cfset cities.cityZip = >xmlResultCity.search["loc"][x].xmlAttributes.id> > <cfset cities.cityName = xmlResultCity.search["loc"][x].xmlText> > <cfset arrayAppend(theCitiesCount, cities)> > </cfloop> > source url: <a href="http://xoap.weather.com/search/search?where=new >york" target="_blank">http://xoap.weather.com/search/search?where=new >york</a> > <cfdump var="#theCitiesCount#"> ></cfoutput> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:3865 Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
