Quantcast
Viewing all articles
Browse latest Browse all 4

Answer by The Somberi for Parse RSS feed for Android

I found the whole SAX thing difficult to look at. I wrote my own parser for RSS, Atom & RDF.

Try MvNewsFeed class in my AndroidWithoutStupid library on GitHub.https://github.com/vsubhash/AndroidWithoutStupid

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

For brevity, I have used a synchronous download method. There is a separate class for asynchronous downloads - MvAsyncDownload. Call the constructor with same parameters.


Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>