name
loadElementFrom ( )
/*
This example loads a xml file and prints it.
*/

import proxml.*;

XMLInOut xmlIO;

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

void xmlEvent(XMLElement xmlElement){
  
}
description
Use this method to load an xml file. If the given String is xml it is directly parsed and converted to a XMLElement. Be aware that it has to start with "<?xml" to be detected as xml. If you call the function with an url the according file is loaded. You can load xml files from your harddisk or the internet. Both works in an application if you export it as an applet it is not possible to directly load xml from external sources, because of java security resctictions. If you want to load external sources you have to use an application on the serverside that passes the file to your applet. You will find examples using php in the processing forum.
syntax
loadElementFrom(documentUrl);
parameters
documentUrl
String, url from where the Element has to be loaded
returns
None
usage
Web & Application
related