Hey everyone,
I'm attempting to parse through the google calendar feed. The problem comes with parsing the "where" tag. When an address is in the "where" it comes back blank; however, when it is just a word, it works fine.
It seems that with an address google adds a <georss:where> tag on top of the normal <gd:where> tag making the php check the wrong tag.
I have been experimenting with getElementsByTagNameNS() but I keep getting errors. What's the proper way to grab the "gd:where" and not the "georss:where".
The PHP:
$entries = $doc->getElementsByTagName( "entry" );
foreach ( $entries as $entry ) {
...
$places = $entry->getElementsByTagName("where");
$where = $places->item(1)->getAttributeNode("valueString")->value;
The XML:
<georss:where>
<gml:Point>
<gml:pos>46.46261 -109.39144</gml:pos>
</gml:Point>
</georss:where>
<gd:eventStatus value='http://schemas.google.com/g/2005#event.confirmed'/>
<gd:transparency value='http://schemas.google.com/g/2005#event.transparent'/>
<gCal:uid value='vl3ueretsi1dissg98q3fplmto@google.com'/>
<gCal:sequence value='2'/>
<gd:when startTime='2009-09-08T10:00:00.000-04:00' endTime='2009-09-08T11:00:00.000-04:00'/>
<gd:who rel='http://schemas.google.com/g/2005#event.organizer' valueString='UF Theatre Department Dates of Interest' email='oqtn87idrk91p07pco6a5rjgpo@group.calendar.google.com'/>
<gd:where valueString='1004 1st Dr. Orlando, FL 32809'/>