name
toString ( )
/*
This example loads a xml file and prints out the root node.
*/

import proxml.*;

XMLInOut xmlIO;

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

void xmlEvent(XMLElement element){
  String root = element.toString();
  println(root);
}

void draw(){
}
description
Use toString to get the String representation of a XMLElement. The Methode gives you the starttag with the name and its attributes, or its text if it is a PCDATA section.
syntax
toString();
returns
String, String representation of the XMLElement
usage
Web & Application
related