I don't know how to parse rss blogger

风流意气都作罢 提交于 2019-12-08 05:38:27

问题


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


回答1:


You should try Blogger Atom XML (http://minecraft-schematics.blogspot.com/atom.xml?redirect=false&start-index=1&max-results=500) also...




回答2:


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.




回答3:


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);
}


来源:https://stackoverflow.com/questions/24994207/i-dont-know-how-to-parse-rss-blogger

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!