I am fairly new to processing I am doing a project at school that I need to grab two different rss feeds into my processing sketch. I feel I was on the right track until I ran into ArrayIndexOutOfBoundsException:0 error on this line..
// Loads RSS feed and gets title and image of each item
XMLElement rss = new XMLElement(this, "http://www.digg.com/rss/index.xml");
XMLElement[] titleXMLElements = rss.getChildren("channel/item/title");
XMLElement[] imageURLElements = rss.getChildren("channel/item/media:thumbnail");
items = new Item[itemNumber];
//Gets title, loads image and creates Item for each feed item
for (int i = 0; i < items.length; i++) {
String title = titleXMLElements[i].getContent();
String imageURL = imageURLElements[i].getStringAttribute("url");
PImage img = loadImage(imageURL);
items[i] = new Item(title, img, 10, i * 50);
}