我正在尝试通过文档的键获取特定文档。我按照这里的说明操作:https ://code.google.com/apis/spreadsheets/data/3.0/reference.html#ConstructingURIs
我从 URL 获取密钥:https ://spreadsheets.google.com/ccc?key=0Aoz...mcmc&hl=en#gid=0
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);
它给了我以下例外:
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
这个例外并没有多大意义。我猜它希望标签成为根,但它正在获取 . 如果我转到我正在使用的 URL,feedUrl
那么我会得到我想要的 XML 文档(具有我想要的文档的名称和所有名称)。我看不出我在这里做错了什么,我在网上找不到任何可以帮助我的东西。
有人看到我做错了什么吗?