You are here

function _agenda_load_xml in Agenda 7

Same name and namespace in other branches
  1. 6 agenda.module \_agenda_load_xml()

Fetch the gData feed and parse the XML

@access private

Parameters

string $googleid The calendars Google ID:

object $block The agenda block settings:

Return value

object An object containing the status, request and result

2 calls to _agenda_load_xml()
agenda_debug in ./agenda.admin.php
Provide a page to debug a calendar ID that is not working
agenda_get_events in ./agenda.module
Given a list of calendar IDs, parse out and return any event data

File

./agenda.module, line 402

Code

function _agenda_load_xml($address, $key, $block) {
  $url = _agenda_feed_url($address, $key, $block);
  $xml = drupal_http_request($url);
  $data = FALSE;
  if ($xml->code === '200') {
    $data = simplexml_load_string($xml->data);
  }
  return $data;
}