XMLElement Test8: listChildren()

Source

// The following short XML file called "sites.xml" is parsed 
// in the code below. It must be in the project's "data" directory
//<?xml version="1.0"?> 
// <websites> 
//  <site> 
//   <name> Processing</name> 
//   <url> www.processing.org</url> 
//  </site> 
// </websites> 

XMLElement xml;
var array[];
void setup() {
  size(200, 200);
  xml = new XMLElement(this, "sites2.xml");
  array = xml.listChildren();
  
  println(array);  // Prints "site"
}