code: function getRoot() {
  		$r = $this->parent;
  		$n = ($r === null) ? null : $r->parent;
  		while ($n !== null) {
  			$r = $n;
  			$n = $r->parent;
  		}
  
  		return $r;
  	}
docs: Get top parent
  @return DomNode Root, null if node has no parent