On Oct 18, 11:40 pm, Roland <rolan... gmail.com> wrote:
> Hi,
>
> I used example to recieve blog posts given here:http://code.google.com/apis/blogger/deve
lopers_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 <rolan... gmail.com> wrote:
> Hi,
>
> I used example to recieve blog posts given here:http://code.google.com/apis/blogger/deve
lopers_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.goog
lecode.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);
.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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Blogger Data API" group.
To post to this group, send email to bloggerDev googlegroups.com
To unsubscribe from this group, send email to
bloggerDev-unsubscribe googlegroups.com
For more options, visit this group at http:
//groups.google.com/group/bloggerDev?hl=en
-~----------~----~----~----~------~----~------~--~---
|