Hi Amao,
Couple of things you might want to check.
Firstly you need to ask for version 3 as the extendedProperties are
not returned. Here's a c-n-p from some working code.
function get($xmlfile) {
try {
@$feed = simplexml_load_file($xmlfile. '&v=3.0');
if ($feed === FALSE) {
throw new Exception(file_get_contents($xmlfile));
}
} catch (Exception $e) {
return array('error' => true, 'payload' => $e->getMessage());
}
return array('error' => false, 'payload' => $xmlData);
}
Next thing to look for is something to tell simplexml that you want to
use the gd namespace. Another example:
$this->nsGd = $xmlData->children('
http://schemas.google.com/g/2005');
...
$this->email = @(string)$this->nsGd->email->attributes()->address;
...
foreach ($this->nsGd->extendedProperty as $x) {
if ($x->attributes()->name == 'ethnicity') {
$this->ethnicity = $x->attributes()->value;
}
}
Hope that helps.
Gavin
> --
> You received this message because you are subscribed to the Google
> Groups "Google Contacts, Shared Contacts and User Profiles APIs" group.
> To post to this group, send email to
>
google-co...@googlegroups.com
> To unsubscribe from this group, send email to
>
google-contacts...@googlegroups.com
> For more options, visit this group at
>
http://code.google.com/apis/contacts/community/forum.html
--
ga...@fnarg.net will expire please update your records