Batch operation to add many google contacts

15 views
Skip to first unread message

byqsri

unread,
Nov 4, 2009, 11:21:03 AM11/4/09
to Google Contacts API
Hi
I try to do a batch operation to add many google contacts.I use Zend
PHP.
My code is:


$xml='
<?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:g="http://base.google.com/ns/1.0"
xmlns:batch="http://schemas.google.com/gdata/batch">
<title type="text">My Batch Feed</title>
<entry>
<batch:operation type="insert"/>
<category scheme="http://schemas.google.com/g/2005#kind"
term="http://schemas.google.com/contact/2008#contact"/>
<title type="text">Test contact - batch insert.</title>
</entry>
</feed>
';

$service = new Zend_Gdata($client);
$entryResult = $service->insertEntry($xml, $batchUrl);

But I get this error:

The processing instruction target matching "[xX][mM][lL]" is not
allowed.

Can someone help me about this error?
Many Thanks

Reply all
Reply to author
Forward
0 new messages