Hi, While retrieving the contacts from Google using Google Contacts API, we have 2 approach:-
1) Using Google Normal Feed Url http://www.google.com/m8/feeds/contacts/[email protected]/full and GET method 2) Using Google Batch Url http://www.google.com/m8/feeds/contacts/[email protected]/full/batch and POST method. For Batch operation, contact ID is a must while retrieving the contacts. Is there any way to get all the contacts using Batch Operation initially, when there is no contacts present in Google(means without passing contact id)? What will be the XML request used for that and the corresponding response.? 3) For Normal GET using step 1, the response will be like this: <?xml version='1.0' encoding='UTF-8'?> <feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch=' http://a9.com/-/spec/opensearchrss/1.0/' xmlns:gContact=' http://schemas.google.com/contact/2008' xmlns:batch=' http://schemas.google.com/gdata/batch' xmlns:gd=' http://schemas.google.com/g/2005'> <id>[email protected]</id> <updated>2009-06-03T06:40:16.168Z</updated> <category scheme='http://schemas.google.com/g/2005#kind' term=' http://schemas.google.com/contact/2008#contact'/> <title type='text'>Test's Contacts</title> <link rel='alternate' type='text/html' href='http://www.google.com/'/> <link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href=' http://www.google.com/m8/feeds/contacts/test.scf%40gmail.com/full'/> <link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href=' http://www.google.com/m8/feeds/contacts/test.scf%40gmail.com/full'/> <link rel='http://schemas.google.com/g/2005#batch' type='application/atom+xml' href=' http://www.google.com/m8/feeds/contacts/test.scf%40gmail.com/full/batch'/> <link rel='self' type='application/atom+xml' href=' http://www.google.com/m8/feeds/contacts/test.scf%40gmail.com/full?max-results=25'/ > <author> <name>Test</name> <email>[email protected]</email> </author> <generator version='1.0' uri='http://www.google.com/m8/feeds '>Contacts</generator> <openSearch:totalResults>1</openSearch:totalResults> <openSearch:startIndex>1</openSearch:startIndex> <openSearch:itemsPerPage>25</openSearch:itemsPerPage> </feed> Here while parsing this response XML, I am having many parsing issue like The atom name space tag is showing Invalid XML format in our application Then the <title> tag has Test's Contacts which has an apostrophe there, So its throwing Unexpected Quotes exception. Is there a way to GET all contacts with a different response so that I can avoid the Xml parsing issues.I am using Javascript for processing these xml responses. When using Batch response I was not having any problem in parsing. But for all contacts batch doesn't help.I am not sure is there a way using batch? Please can anyone suggest a solution for this? Thanks, Test. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
