nebbiolo
Geocacher
Hallo und frohe Weihnachten
Ich möchte aus einer GPX-Datei das Land auslesen.
Mit den Felder unter "wpt" funktioniert alles bestens, aber wie kann ich das Feld:
<groundspeak:country>Austria</groundspeak:country> auslesen?
$gpx = simplexml_load_file("test.gpx");
foreach ($gpx->wpt as $gc)
{
$lat = (string) $gc['lat'];
$lon = (string) $gc['lon'];
$type = (string) $gc->type;
$name = (string) $gc->name;
$land = (string) $gc->country; ??
echo $type,$lat,$lon,$name,$land,"<br/>";
}
unset($gpx);
Ich möchte aus einer GPX-Datei das Land auslesen.
Mit den Felder unter "wpt" funktioniert alles bestens, aber wie kann ich das Feld:
<groundspeak:country>Austria</groundspeak:country> auslesen?
$gpx = simplexml_load_file("test.gpx");
foreach ($gpx->wpt as $gc)
{
$lat = (string) $gc['lat'];
$lon = (string) $gc['lon'];
$type = (string) $gc->type;
$name = (string) $gc->name;
$land = (string) $gc->country; ??
echo $type,$lat,$lon,$name,$land,"<br/>";
}
unset($gpx);