Processing google calendar feed (prefixed namespace issue)

Processing google calendar feed (prefixed namespace issue)

am 15.06.2007 17:36:35 von Andrew Darby

Hello PHP people. I'm trying to use simplexml to gather info from a
google calendar feed, and I've run into a problem where the google xml
has a namespace prefixed to some fields, and I don't know how to deal
with this colon. For instance:

$xml_data = simplexml_load_file($xml);

foreach ($xml_data->entry as $item) {

print "

";
print $item->title;
print "
";
print $item->gd:when;
print "

";

}

Printing the $item->title works fine, but it chokes on the colon for
the tag gd:when. Any ideas how I can extract data from an xml line
that looks like this:

endTime='2007-07-29T20:00:00.000-04:00'>

Thanks,

A.

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php