public function finish()
    {
        $this->xml_depth = 0;
        $this->current_ns = [];
        $this->idhandlers = [];
        $this->xpathhandlers = [];
        $this->eventHandlers = [];
    }