function clear() { $this->dom = null; $this->nodes = null; $this->parent = null; $this->children = null; }