public function end_element($parser, $name) { if ($name == 'CATEGORY') { array_pop($this->categorystack); } }