I had a similar issue with my <entry> tag. Turned out I needed to add attributes: <entry xmlns="http://www.w3.org/2005/Atom" xmlns:gs="http://schemas.google.com/spreadsheets/2006">
I'm not sure what problem you are having but it might be worth checking the tag attributes. On Wednesday, January 19, 2011 3:38:22 PM UTC-8, Joel Johnson wrote: > > I'm trying to get a specific document by the key of the doc. I'm following > the instructions here: > https://code.google.com/apis/spreadsheets/data/3.0/reference.html#ConstructingURIs > > <https://code.google.com/apis/spreadsheets/data/3.0/reference.html#ConstructingURIs> > I get the key from the URL: https://spreadsheets.google.com/ccc?key=* > 0Aoz...mcmc*&hl=en#gid=0 (I added the *...* to the key to make it short > and keep it private) > > URL feedUrl = new URL(" > https://spreadsheets.google.com/feeds/spreadsheets/private/full* > /0Aoz...mcmc*"); > SpreadsheetFeed feed = _service.getFeed(feedUrl, SpreadsheetFeed.class); > _entry = feed.getEntries().get(0); > > It gives me the following exception: > > Exception in thread "main" com.google.gdata.util.ParseException: [Line 1, > Column 165] Invalid root element, expected (namespace uri:local name) of ( > http://www.w3.org/2005/Atom:feed), found ( > http://www.w3.org/2005/Atom:entry > > The exception doesn't really make a whole lot of sense. I guess it wants > the <feed> tag to be the root but it's getting <entry>. If I go to the URL > I'm using for feedUrl then I get the XML document I want (has the name > and all that of the document I'm aiming for). I don't see what I'm doing > wrong here and I can't find anything online that has been able to help me. > > Anyone see what I'm doing wrong? > > Thanks >
