Skip to content

Instantly share code, notes, and snippets.

@ssx
Created October 10, 2010 23:00
Show Gist options
  • Save ssx/619669 to your computer and use it in GitHub Desktop.
Save ssx/619669 to your computer and use it in GitHub Desktop.
<?php
// Firstly we need to load our XML file (test.gpx) into
// a resource that we can use
$xml = simplexml_load_file("test.gpx");
// Put our cache data into a easy to use variable
$data = $xml->wpt->children("http://www.groundspeak.com/cache/1/0");
// You can now do anything you wish with the data,
// like printing out the cache title and size/container
echo "Name of Cache: ".$data->cache->name."<br />\n";
echo "Cache Contaner: ".$data->cache->container;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment