public function onEndElement($parser, $element)
    {
        $this->parserLevel--;
        if ($this->parserLevel > 0) {
            return;

        }
        if ($element != \strtoupper($this->getIndex()->getElement())) {
            throw new ReadDataIndexException(
                "Unexpected closing of element '$element'."
            );

        }
        $this->parserPosition = \xml_get_current_byte_index($parser);
    }