I was having the exact same issue. But a POST request worked where PUT 
throws the error "Invalid root element". For anyone looking in the 
future....

On Thursday, May 14, 2009 10:50:34 AM UTC-7, Robert Kluin wrote:
>
> I am having issues trying to perform a batch update on a spreadsheet. 
>
> Following the protocol guide (http://code.google.com/apis/spreadsheets/ 
> docs/2.0/developers_guide_protocol.html#SendingBatchRequests<http://code.google.com/apis/spreadsheets/docs/2.0/developers_guide_protocol.html#SendingBatchRequests>)
>  
> I have 
> constructed a request.  I have also referenced the "Batch" reference 
> document (http://code.google.com/apis/gdata/batch.html) and not found 
> a solution. 
>
> All of the header and auth information for the request appear to be 
> ok.  I am able to perform inserts/updates using the "list feed" and 
> and individual updates to cells via the "cell feed" without any 
> issues. 
>
> I am POSTing (in "xdp:body") the following XML to: 
> http://spreadsheets.google.com/feeds/cells/KEY/od7/private/full/batch. 
>
> <?xml version='1.0' encoding='UTF-8' ?> 
> <feed xmlns='http://www.w3.org/2005/Atom' xmlns:gs='http:// 
> schemas.google.com/spreadsheets/2006' xmlns:batch='http:// 
> schemas.google.com/gdata/batch'> 
>   <id>http://spreadsheets.google.com/feeds/cells/KEY/od7/private/full</ 
> id> 
>   <entry> 
>     <batch:id>month</batch:id> 
>     <batch:operation type='update'/> 
>     <id>http://spreadsheets.google.com/feeds/cells/KEY/od7/private/ 
> full/R44C1<http://spreadsheets.google.com/feeds/cells/KEY/od7/private/full/R44C1></id>
>  
>
>     <link rel='edit' type='application/atom+xml' href='http:// 
> spreadsheets.google.com/feeds/cells/KEY/od7/private/full/R44C1/728sg'/ 
> > 
>     <gs:cell row='44' col='1' inputValue='value 1'/> 
>   </entry> 
>   <entry> 
>     <batch:id>day</batch:id> 
>     <batch:operation type='update'/> 
>     <id>http://spreadsheets.google.com/feeds/cells/KEY/od7/private/ 
> full/R44C2<http://spreadsheets.google.com/feeds/cells/KEY/od7/private/full/R44C2></id>
>  
>
>     <link rel='edit' type='application/atom+xml' href='http:// 
> spreadsheets.google.com/feeds/cells/KEY/od7/private/full/R44C2/h1u68'/ 
> > 
>     <gs:cell row='44' col='2' inputValue='value 2'/> 
>   </entry> 
>   <entry> 
>     <batch:id>hours</batch:id> 
>     <batch:operation type='update'/> 
>     <id>http://spreadsheets.google.com/feeds/cells/KEY/od7/private/ 
> full/R44C6<http://spreadsheets.google.com/feeds/cells/KEY/od7/private/full/R44C6></id>
>  
>
>     <link rel='edit' type='application/atom+xml' href='http:// 
> spreadsheets.google.com/feeds/cells/KEY/od7/private/full/R44C6/1b0mbk'/ 
> > 
>     <gs:cell row='44' col='6' inputValue='value 3'/> 
>   </entry> 
>   <entry> 
>     <batch:id>rhours</batch:id> 
>     <batch:operation type='update'/> 
>     <id>http://spreadsheets.google.com/feeds/cells/KEY/od7/private/ 
> full/R44C7<http://spreadsheets.google.com/feeds/cells/KEY/od7/private/full/R44C7></id>
>  
>
>     <link rel='edit' type='application/atom+xml' href='http:// 
> spreadsheets.google.com/feeds/cells/KEY/od7/private/full/R44C7/1l07pc'/ 
> > 
>     <gs:cell row='44' col='7' inputValue='value 4'/> 
>   </entry> 
> </feed> 
>
>
> The response from the server: 
>
> [Line 1, Column 189] Invalid root element, expected (namespace 
> uri:local name) of (http 
> ://www.w3.org/2005/Atom:entry), found (http://www.w3.org/2005/ 
> Atom:feed 
>
>
>
> Anyone have any thoughts? 
>

Reply via email to