name
getParent ( )
/*
This example loads a xml file and prints out the parent of the first child
of the root node which is the root node itself
*/

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

void draw(){
}
description
With getParent() you can get the parent of a XMLElement. If the XMLElement is the root element it returns null.
syntax
getParent();
returns
XMLElement, the parent of the XMLElement or null if the XMLElement is the root element
usage
Web & Application
related