Hi Tyler, I recently saw this question in another group, so don't think you're the only one who finds it confusing. To get at the text you need to cast the element's content to a TextContent object. Then you can get the text like this:
TextContent content = (TextContent) element.getContent(); String text = content.getContent().getPlainText(); The Content object has several subclasses so that the client library can handle text, media or other types of content. It adds a bit of complexity to the code shown here, but allows for the library to handle content like pictures and video. Hope that helps, Lane On May 15, 8:21 am, TylerJames <[EMAIL PROTECTED]> wrote: > Hey everyone, > > Just started to play around with this Gdata stuff and I'm just going > along with the (Java) tutorial found > here:http://code.google.com/apis/gdata/client-java.html#Tutorial > > Simply for demonstration purposes I'd like to retrieve some > EventEntries from my calendar and then print some of the relevant > information about the entry to the console. (e.g. Title, Author, > Content, Publish date, etc) I've been able to print most stuff except > for the Content. When you set the Content ("meet for a quick lesson") > you provide a string, like this: > myEntry.setContent(new PlainTextConstruct("Meet for a quick lesson.")) > > The problem that I'm having is trying to retrieve and print a String > representation of that "Meet for a quick lesson" part. You can invoke > getContent() on the EventEntry object, which returns a Content object. > However that Content object doesn't seem to have any methods that > allow you to print the original content message. > > Any ideas how this could be accomplished? > > Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Data API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-help-dataapi?hl=en -~----------~----~----~----~------~----~------~--~---
