2 messages in com.googlegroups.bloggerdevRe: Receiveving content of a blog post
FromSent OnAttachments
Roland18 Oct 2007 23:39 
Jeff Scudder22 Oct 2007 15:03 
Subject:Re: Receiveving content of a blog post
From:Jeff Scudder (j.@google.com)
Date:10/22/2007 03:03:27 PM
List:com.googlegroups.bloggerdev

On Oct 18, 11:40 pm, Roland <rola@gmail.com> wrote:

Hi,

I used example to recieve blog posts given
here:http://code.google.com/apis/blogger/developers_guide_java.html#Retrie...

But I'm having trouble getting posts actual text..

Entry entry = resultFeed.getEntries().get(i); System.out.println("\t" + i+ " "+entry.getXmlBlob());

Shouldn't getXmlBlob give me the xml of a post? anyway,the returned XmlBlob object itself isn't null,but as I try to print getXmlBlob.getFullText() or any other get method,I get null..

what am I doing wrong

Thanks in advance,Roland

On Oct 18, 11:40 pm, Roland <rola@gmail.com> wrote:

Hi,

I used example to recieve blog posts given
here:http://code.google.com/apis/blogger/developers_guide_java.html#Retrie...

But I'm having trouble getting posts actual text..

Entry entry = resultFeed.getEntries().get(i); System.out.println("\t" + i+ " "+entry.getXmlBlob());

Shouldn't getXmlBlob give me the xml of a post? anyway,the returned XmlBlob object itself isn't null,but as I try to print getXmlBlob.getFullText() or any other get method,I get null..

what am I doing wrong

Thanks in advance,Roland

There is a handy utility method called dump in the sample code that comes with the client library which will allow you to convert the entry to an XML and write it to an OutputStream. The method you want is in this file:
http://gdata-java-client.googlecode.com/svn/trunk/java/sample/util/CommonUtils.java

If you copy the dump method into your class, you code might look like this:

import com.google.gdata.util.common.xml.XmlWriter; ... for (int i = 0; i < resultFeed.getEntries().size(); i++) { Entry entry = resultFeed.getEntries().get(i); {YourClass}.dump(entry, System.out); System.out.println(); }

Does this give you what you want? I think this works well if all you want to do is write the XML string to a stream.

Happy coding,

Jeff