If have php5 + you can use SimplXML
<?
$filename = "myxmlfile.xml";
if (file_exists($filename)) {
$xml = simplexml_load_file($filename);
$var_dumb($xml);
} else {
exit('Failed to open '.$filename);
}
?>
<?xml version="1.0" encoding="UTF-8" ?>
- <ResultSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:yahoo:maps" xsi:schemaLocation="urn:yahoo:maps http://api.local.yahoo.com/MapsService/V1/GeocodeResponse.xsd">
- <Result precision="address">
<Latitude>40.108581</Latitude>
<Longitude>-75.480794</Longitude>
<Address>1510 WATERFORD LN</Address>
<City>PHOENIXVILLE</City>
<State>PA</State>
<Zip>19460-5707</Zip>
<Country>US</Country>
</Result>
</ResultSet>
- <!-- ws02.search.scd.yahoo.com uncompressed/chunked Tue Dec 6 15:17:32 PST 2005
-->