I don't know how to parse rss blogger

2019-05-30 00:11发布

I have a problem with an rss reader
i use this code: http://techiedreams.com/android-simple-rss-reader/

And it works with other websites but not with mi blogger blog, i try this feed url but in the app te activity stays with a white background and do not show anithing, in the log console i can't see anything strange.

minecraft-schematics.blogspot.com/feeds/posts/default?alt=atom

minecraft-schematics.blogspot.com/feeds/posts/default?alt=rss

I also try it with my wordpress blog (is the same) but it only works with rdf format and do not show any picture.

How can fix this? Thanks

3条回答
我命由我不由天
3楼-- · 2019-05-30 00:48

Try my AndroidWithoutStupid library. I tested it with the links you have given and it works fine. https://github.com/vsubhash/AndroidWithoutStupid

Example is here https://stackoverflow.com/a/24587871/2014914

Update:

MvGeneral.startSyncDownload("http://www.example.com/rss.xml", "/mnt/sdcard/rss.xml");
MvNewsFeed oFeed = new MvNewsFeed("/mnt/sdcard/rss.xml");
for (int i = 0; i < oFeed.moMessages.size(); i++) {
  Log.d("YOUR_TAG", oFeed.moMessages.get(i).msMessageTitle);
  Log.d("YOUR_TAG", oFeed.moMessages.get(i).msMessageContent);
  Log.d("YOUR_TAG", oFeed.moMessages.get(i).msMessageLink);
}
查看更多
太酷不给撩
4楼-- · 2019-05-30 00:53

You can try this library: https://github.com/Pkmmte/PkRSS

It works with most RSS2 and Atom feeds but allows you to plug in your own parser if necessary.

查看更多
登录 后发表回答