name
hasChildren ( )
/*
This example loads an xml file and 
 checks if it has children
 */

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.hasChildren());
}

void draw(){
}
description
Specifies whether or not the XML object has child nodes.
syntax
hasChildren();
returns
boolean, true if the specified XMLElement has one or more child nodes; otherwise false.
usage
Web & Application
related