Help a noob with some XML?

Ok, so I’ve analyzed a Twitter RSS feed, and I know exactly what I want to do with which elements. Unfortunately, I don’t know how to do it. Here’s the broken code I’ve come up with:

String url = "http://search.twitter.com/search.rss?q=madatoms";  
XMLElement rss = new XMLElement(this, url);  

XMLElement[] imageURLElements = rss.getChildren("channel/item/media:content");  
XMLElement[] descriptionXMLElements = rss.getChildren("channel/item/description");
XMLElement[] guidXMLElements = rss.getChildren("channel/item/guid");
XMLElement[] pubDateXMLElements = rss.getChildren("channel/item/pubDate");
for (int i = 0; i < 7; i++) {
    String imageURL = imageURLElements*.getStringAttribute("url");
    PImage img = loadImage(imageURL);
    String description = descriptionXMLElements*.getContent();  
    String guid = guidXMLElements*.getContent();  
    String pubDate = pubDateXMLElements*.getContent(); 
    println("<a href=" + guid + ">" + image(img) + "</a>" + description + "<br>" + pubDate);  
} 

So what I’m trying to get it to do is display the image (which is a link to the guid, or the location of the original post), then display the description text, then on the next line show the pubDate (publishing date).

First of all, I have no idea if what I’ve written makes sense. It won’t validate, as an XML file, it gives me a syntax error right from the first line.

Second, I have no idea how to then get this to then work on my page. Do I keep this as a separate file? Feed it in somehow? Or do I paste this right into my HTML?

Bonus points if the pubDate text can have its size and color attributes edited. Also, ideally, the image will float left so the text will wrap around it intelligently.