Skip to content Skip to sidebar Skip to footer

Rss Reader Isn't Getting Some Tags

This is a continue question from my previous question here :RSS Reader NullPointerException In my app,in my list, sometimes i don't get the title of the RSS,and sometimes the descr

Solution 1:

Once you are looping the through the item nodes, you then have another loop that attempts to iterate through the child elements (to set title, description, etc).

But you loop is starting at index 1 and is increasing by 2:

// Get the required elements from each Itemfor (int j = 1; j < clength; j = j + 2) {

This means it only checks position 1,3,5,etc

Looking at the xml posted, that shows why you get different data each item. Set the loop to index at 0 and increase by just 1.

Post a Comment for "Rss Reader Isn't Getting Some Tags"