Php 如何从url解析输出xml

Php 如何从url解析输出xml,php,xml,Php,Xml,我有一些网址: 如何解析该url的输出? 我想得到这样的结果: $lon = 106.878021 $lat = -6.235802 我试过这个: <?php $xml = simplexml_load_string(file_get_contents('http://fleet.utrack.co.id/wstj/service.asmx/GetVName?group=2021')); print_r($xml); ?> 展示你的努力。另外,在该结构中没有这样的值-

我有一些网址:

如何解析该url的输出?
我想得到这样的结果:

$lon = 106.878021
$lat = -6.235802
我试过这个:

<?php
    $xml = simplexml_load_string(file_get_contents('http://fleet.utrack.co.id/wstj/service.asmx/GetVName?group=2021'));

print_r($xml);

?>

展示你的努力。另外,在该结构中没有这样的值
-6.235802
。呃,很抱歉,我对url的理解有误,我正在编辑我的问题。你想获取第一个
日志/lat
?我想获取所有长lat作为数组
SimpleXMLElement Object ( )