Hi people,
I am running a problem here.I am using HttpSocket to get some data
from an external site(i am building a geocoding app) but i cant
manipulate the returned xml data.I do somewthing like this

$results = $HttpSocket->get('http://ws.geonames.org/search?',
'q=barcelona&maxRows=10');
                $parsed_xml =& new XML($results);
                $parsed_xml = Set::reverse($parsed_xml);

and when i use debug($results); i get the data i want but in their
pure format.The xml looks like this:

<geonames style="MEDIUM">
<totalResultsCount>6784</totalResultsCount>
-
<geoname>
<name>London</name>
<lat>51.5084152563931</lat>
<lng>-0.125532746315002</lng>
<geonameId>2643743</geonameId>
<countryCode>GB</countryCode>
<countryName>United Kingdom</countryName>
<fcl>P</fcl>
<fcode>PPLC</fcode>
</geoname>
-
<geoname>
<name>London</name>
<lat>42.983389283</lat>
<lng>-81.233042387</lng>
<geonameId>6058560</geonameId>
<countryCode>CA</countryCode>
<countryName>Canada</countryName>
<fcl>P</fcl>
<fcode>PPL</fcode>
</geoname>
.........

How can i show in my view only the name,countryCode and countryName
attributes?I have read many articles but nothing helped me!

Any help guys?

Ty v.much!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to