function handlerCharacterData($a_xml_parser, $a_data) { if ($this->in_meta_data) { parent::handlerCharacterData($a_xml_parser, $a_data); return true; } }
/** * handler for character data * * @param resource $a_xml_parser xml parser * @param string $a_data character data */ public function handlerCharacterData($a_xml_parser, $a_data) { if ($this->in_metadata) { parent::handlerCharacterData($a_xml_parser, $a_data); } if ($a_data != "\n") { // Replace multiple tabs with one space $a_data = preg_replace("/\t+/", " ", $a_data); $this->cdata .= $a_data; } }
/** * send all cached tags to the meta data parser and * clear the cache */ function emptyMediaMetaCache(&$a_xml_parser) { foreach ($this->media_meta_cache as $cache_entry) { switch ($cache_entry["type"]) { case "handlerBeginTag": parent::handlerBeginTag($a_xml_parser, $cache_entry["par1"], $cache_entry["par2"]); break; case "handlerEndTag": parent::handlerEndTag($a_xml_parser, $cache_entry["par1"]); break; case "handlerCharacterData": parent::handlerCharacterData($a_xml_parser, $cache_entry["par1"]); break; } } $this->media_meta_start = false; $this->media_meta_cache[] = array(); }