Retrieving a single document entry using the Java client library


The snippet below demonstrates how to retrieve a single DocumentListEntry using the Java client library:
import java.net.URL;

import com.google.gdata.client.docs.DocsService;
import com.google.gdata.data.docs.DocumentListEntry;

public class DocumentListGetEntry {

  public static void main(String[] args) {
    try {
      DocsService docsService = new DocsService("Document List Demo");
      docsService.setUserCredentials("foobar@example.com", "secret");
   
      URL documentURI = new URL("http://docs.google.com/feeds/documents/private/full/spreadsheet%3Apc6ppXdYxYkSSOvE8tCUELw");
      DocumentListEntry entry = docsService.getEntry(documentURI, DocumentListEntry.class);
   
      System.out.println(entry.getTitle().getPlainText());  
  
    } catch (Exception e) {
      System.err.println(e.toString());
    }
  }
}

5 comments:

Kanopy123 said...

Hi. Thanks for this

Do you know how to obtain the content of a document get
Content() just gets me a content object but I can't seem to work out how to get an xml representation of a document so I can edit the content and re-upload?

Thanks

Kimberly said...

Hi I liked your information and would like to continue posting more about it .... in fact I did a while ago to work in or call virtual laser keyboard on this subject and I was fascinated ... thanks

Flower Girl Dresses said...

This is a good,common sense article.Very helpful to one who is just finding the resouces about this part.It will certainly help educate me.
----------------------------------------------------------
Flower Girl Dresses|Empire Wedding Dresses|New Style Wedding Dresses

kosovohp said...

Girl Xinh | Hot Girl | Cute Girl | Sexy Girl | Hot Girl Asian
Hot Girl | Lexi Belle | Sexy Girl | Cute Girl | Hot Asian Girl | Leah Dizon | Hot Girl Asian | Girl Xinh
socks proxy | socks5 | proxy free |proxy list

thanh tung said...

healthtips
healthtips
healthtips
healthtips
healthtips




socks proxy
socks proxy
socks proxy
socks proxy
socks proxy
socks proxy
socks proxy
socks proxy
socks proxy
socks proxy
check socks proxy
socks proxy
socks proxy






funnystory
funnystory
funnystory
funnystory
funnystory




funny pictures
funny pictures
funny pictures
funny pictures
funny pictures
funny pictures






Girl Xinh
Girl Xinh
Girl Xinh
Girl Xinh
Girl Xinh
Girl Xinh
Girl Xinh





cute animal
food news
internet
football news
bank news
marketing
science news
travel vietnamt
real estate vietnam
business news
music news
health news
software
seo news