name
hasAttributes ( )
/*
This example loads a xml file and checks if the 
root element has attributes
*/

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

void draw(){
}
description
Use this method to check if the XMLElement has attributes.
syntax
hasAttributes();
returns
boolean, true if the XMLElement has attributes
usage
Web & Application
related