I am parsing an rss XML news feed for an Android app. I am using SAXParser
and all is working as it should but I would like to be able to limit the number of stories that I am retrieving and I cannot find a way to do so. For instance, say there are 45 stories from one of the news feeds and I just want the newest 10. As it is now, I am just grabbing them all into an ArrayList
and only displaying the ones I want, which most certainly is the most efficient way of doing this I am sure.
I can provide the parsing code if necessary.
Thanks to anyone looking at this!