Google api 通过文档列表数据API中的文档ID检索文档

Google api 通过文档列表数据API中的文档ID检索文档,google-api,google-docs-api,google-docs,Google Api,Google Docs Api,Google Docs,我正在尝试按id检索文档,以获取与此文档关联的文件夹/集合,但遇到此错误 com.google.gdata.util.ParseException:[第1行,第266列]应为无效的根元素(命名空间uri:本地名称) 代码如下: DocsService client = new DocsService("test testnet v1"); URL feedUri = new URL("https://docs.google.com/feeds/default/private/full/"

我正在尝试按id检索文档,以获取与此文档关联的文件夹/集合,但遇到此错误

com.google.gdata.util.ParseException:[第1行,第266列]应为无效的根元素(命名空间uri:本地名称)

代码如下:

  DocsService client = new DocsService("test testnet v1");
  URL feedUri = new URL("https://docs.google.com/feeds/default/private/full/"+DOCID+"?oauth_token="+token);
DocumentListFeed feed = client.getFeed(feedUri, DocumentListFeed.class);
      for (DocumentListEntry entry : feed.getEntries()) {
          if (!entry.getParentLinks().isEmpty()) {
                for (Link link : entry.getParentLinks()) {
                      System.out.print(link.getTitle()+""+link.getHref());                      
                          }
              }
      }

不知道这是不是最好的方式,或者哪种方式是通过id获取文档的方式,您可以使用发送请求来查看原始XML数据并与我们共享它吗? 可能有无效的XML元素阻止解析器对其进行分析