47990

Question:
Input is a URL like this <a href="http://ws.geonames.org/children?geonameId=6255148" rel="nofollow">http://ws.geonames.org/children?geonameId=6255148</a> and I would like to receive the XML file in a SimpleXMLElement for example?
Answer1:Try this as your base point:
<?php
$xml = simplexml_load_file("http://ws.geonames.org/children?geonameId=6255148");
//print_r($xml);
foreach($xml->geoname as $geo)
{
echo $geo->toponymName . "<br />";
}
?>