Status
denver #weatherenvy
Location
Washington, DC
Subscribe to GeoRSS Subscribe to KML


Google Calendar and abusing/not-using XML

Published in Google, Google Calendar, Programming, Technology  |  3 Comments


Update: – Google has added a full mode (replace basic in the feed XML url) which provides very nice XML. startDate and endDate are attributes of the gd:when tag. Also, another nice thing was the expansion of recurring events by specifying a window of dates to query. The events are both marked as recurring (and still using iCal recurring format) as well as specifically placed at each recurring event time. This allows devs and users to quickly use the XML feed and provide recurring events without having to deal with that massive hoard of confusing logic (every other Tuesday in April and June except on the 3rd Tuesday of June)

I spent the weekend digging further into the Google Calendar tidbits and putting together a project. There are some odd things about the XML output.

The actual date and time of the event are stored as plain text in the summary node:

When: 2006-05-14 20:30:00 to 2006-05-14 22:30:00
Who: Where: Boston Logan Airport, Boston, MA
Event Status: CONFIRMED

Why didn’t Google use some form of XML, perhaps inspired by the Microformats hCalendar format? This is especially important because as Google demonstrated, it seems to change between using <br> to properly formed <br/> tags (breaking my parsing code).

What is even more puzzling are recurring events:

Recurring Event
First start: 2006-04-18 09:00:00
Duration: 5400
Who: Public,Where: Warren, Michigan
Event Status: CONFIRMED

There is no actual output of the ending date, or type of recurrance the appointment has. iCal specifies it as the following:


DTSTART;TZID=America/New_York:20060418T090000
DURATION:PT5400S
RRULE:FREQ=WEEKLY;BYDAY=TU;UNTIL=20060627T130000Z

which covers all the pertinent information for recreating the output. This is perhaps why the Google Calendar homepage add-in doesn’t yet support recurring events. It’s currently impossible to!

And don’t trying going to http://schemas.google.com/, which is where the schema tag points to.

Lastly, it would be very nice if the If-None-Match request-header was honored for updating the calendar RSS feeds.

Hopefully Google fleshes this out soon.

Similar Posts


Responses

  1. Anonymous says:

    May 2nd, 2006 at 11:26 pm (#)

    They did, you just need to read the API. You can use /full?min-start=2006-01-01&max-start=2006-12-01 or similar to expand recurring events to normal events in the range, and break out when/where/who into separate XML tags (gd:when, gd:where, gd:who, etc.). The “/basic” form of the XML is for light reading. For programming, use “/full”, ideally with the date range to automatically convert repeating events into a set of separate events.

  2. Andrew says:

    May 3rd, 2006 at 6:07 am (#)

    Yep – they added that after I wrote this post, I’ll update the post to reflect this.

  3. anonymous (2) says:

    July 17th, 2006 at 3:18 pm (#)

    Anonymous –
    apparently this is no longer true? i can’t seem to get the recurring events to expand to full events even with the min/max date params

  4. mtoagvuryl says:

    June 20th, 2007 at 8:52 pm (#)

    Hello! Good Site! Thanks you! ivhlunmhvfa

Leave a Response