how to read xml data in php code example
Example 1: php read xml from url
$xml=simplexml_load_file("filename.xml") or die("Error: Cannot create object");
echo $xml->detaildata->lattitude;
echo $xml->detaildata->longitude;
Example 2: read xml file in php wordpress
$xml = simplexml_load_file('big_xml_file.xml');
foreach ($xml->element as $el) {
echo $el->name;
}