protected function endElement($parser, string $name): void
    {
        if (($this->process_footnote || $name === 'Footnote') && ($this->process_ifs === 0 || $name === 'if') && ($this->process_gedcoms === 0 || $name === 'Gedcom') && ($this->process_repeats === 0 || $name === 'Facts' || $name === 'RepeatTag' || $name === 'List' || $name === 'Relatives')) {
            $start_method = $name . 'StartHandler';
            $end_method   = $name . 'EndHandler';
            if (method_exists($this, $end_method)) {
                $this->$end_method();
            } elseif (!method_exists($this, $start_method)) {
                $this->htmlEndHandler($name);
            }
        }
    }