name
getElement ( )
/*
This example loads a xml file and prints out the name 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){
  println(element.getElement());
}

void draw(){
}
description
Use this method to get the name of a XMLElement. If the XMLElement is a PCDATA section getElement() gives you its text.
syntax
getElement();
returns
String, the name of the element or the text if it is a text element
usage
Web & Application
related