Created
July 27, 2011 16:01
-
-
Save jpfinley/1109676 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
XMLElement xml; | |
void setup() { | |
size(200, 200); | |
String url = YOUR_URL_HERE; | |
xml = new XMLElement(this, url); | |
XMLElement[] tracks = xml.getChildren("recenttracks/track"); | |
for (int i = 0; i < tracks.length; i++) { | |
XMLElement artist = tracks[i].getChild("artist"); | |
XMLElement name = tracks[i].getChild("name"); | |
XMLElement dateElement = tracks[i].getChild("date"); | |
int date = dateElement.getInt("uts"); | |
println(date + " : " + artist.getContent() + " : " + name.getContent()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment