name
getChildren ( )
/*
This example loads an xml file and 
prints out the children of the root element
*/

import proxml.*;

XMLInOut xmlIO; 

void setup(){
  size(400,400);

  xmlIO = new XMLInOut(this);
  xmlIO.loadElement("my-xml-file.xml");
}

void xmlEvent(XMLElement element){
  XMLElement[] children = element.getChildren();

  for(int i = 0; i < children.length;i++){
    XMLElement child = children[i];
    println(child);
  }
}

void draw(){
}
description
Use getChildren() to get an array with all children of an element. Each element in the array is a reference to an XML object that represents a child element.
syntax
getChildren();
returns
XMLElement[], an Array of child elements
usage
Web & Application
related