private void unregisterElement(Element element){
  elements.remove(element);
  for (  Element child : element.getChildren()) {
    unregisterElement(child);
  }
}

private void unregisterElement ( Element element ) { elements . remove ( element ) ; for ( Element child : element . getChildren ( ) ) { unregisterElement ( child ) ; } }
removes element and children from tree
