// The following short XML file called "sites.xml" is parsed // in the code below. It must be in the project's "data" directory // // // Processing // Processing Mobile // XMLElement xml; void setup() { size(200, 200); xml = new XMLElement(this, "sites.xml"); int numSites = xml.getChildCount(); for (int i = 0; i < numSites; i++) { XMLElement kid = xml.getChild(i); int id = kid.getIntAttribute("id"); String url = kid.getStringAttribute("url"); String site = kid.getContent(); println(id + " : " + url + " : " + site); } }