believe it or not, but the problem was the "atom:" before phoneNumber
I went ahead and made a function to deal with this
/**
* Takes an xml document and remove "atom:"
* from certain tags
* @param $xml the xml
*/
public static function unatomize_xml($xml)
{
//replacing everything doesn't work
//$new_xml = preg_replace('%(<(/)?atom:)([^ >]+)%si', '<\\2\\3',
$xml);
//instead choose the ones we want to replace
$tags_re = 'email|phoneNumber|structuredPostalAddress|
formattedAddress|birthday';
$new_xml = preg_replace('/atom:('.$tags_re.')/si', '\\1', $xml);
return $new_xml;
}
On Oct 10, 9:36 am, TearsForNations <[email protected]> wrote:
> Why won't my account get updated, it succeeds, but won't show up in my
> gmail contacts:
>
> ....
> <atom:phoneNumber rel="http://schemas.google.com/g/
> 2005#other">555-1213</atom:phoneNumber>
> <atom:phoneNumber rel="http://schemas.google.com/g/
> 2005#mobile">555-1214</atom:phoneNumber><atom:phoneNumber rel="http://
> schemas.google.com/g/2005#fax">555-1215</atom:phoneNumber></atom:entry>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Contacts API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-contacts-api?hl=en
-~----------~----~----~----~------~----~------~--~---