I can get all the data's except lat,lng and address.
How to get these data's , where i am going wrong?
Here is my code
<device_lastupdate>
<version>1.0</version>
<device>
<id>012980000234020</id>
<updated_at type="dateTime">2015-01-28T10:21:50+05:30</updated_at>
<location>
<lat type="float">12.828383</lat>
<lng type="float">79.695983</lng>
<address>Karukinil Amarthanval Street</address>
</location>
<odometer type="float">12341</odometer>
<speed type="float">0</speed>
<ignition>false</ignition>
</device>
and here is my php code
$xml = simplexml_load_file("data.xml");
echo "<h2>".$xml->getName()."</h2><br />";
foreach($xml->children() as $device)
{
echo "ID : ".$device->id."<br />";
echo "Updated At : ".$device->updated_at." <br />";
echo "Latitude : ".$device->lat." <br />";
echo "Longitude : ".$device->lng." <br />";
echo "Address : ".$device->address." <br />";
echo "Odometer : ".$device->odometer." <br />";
echo "Speed: ".$device->speed." <br />";
echo "Ignition:".$device->ignition."<br />";
echo "<hr/>";
}