This reference is for Processing 2.0+. If you have a previous version, use the reference included with your software. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Javadoc.

Class

XML

Name

getContent()

Examples
// The following short XML file called "sites.xml" is parsed 
// in the code below. It must be in the project's "data" directory
// <?xml version="1.0"?>
// <websites>
//   <site id="0" url="processing.org">Processing</site>
//   <site id="1" url="mobile.processing.org">Processing Mobile</site>
// </websites>

XML xml;

void setup() {
  xml = loadXML("mammals.xml");
  XML firstChild = xml.getChild("animal");
  println(firstChild.getContent());
}

// Sketch prints:
// Goat
Description Returns the content of an element. If there is no such content, null is returned.

Syntax
.getContent() 
ReturnsString
Updated on December 7, 2012 08:53:46am PST

Creative Commons License