name
countAllChildren ( )
/*
This example loads a xml file and counts all elements in the file.
*/

import proxml.*;

XMLInOut xmlIO;

void setup(){
  size(400,400);
  
  xmlIO = new XMLInOut(this);
  xmlIO.loadElement("my-xml-file.xml");
}

void xmlEvent(XMLElement element){
  println(element.countAllChildren());
}

void draw(){
}
description
This method returns the number of all nodes of a XMLElement.
syntax
countAllChildren();
returns
int, the number of all decendents of an Element
usage
Web & Application
related