note 49943 added to function.xml-set-character-data-handler

From: Date: Sun, 13 Feb 2005 05:53:47 +0000
Subject: note 49943 added to function.xml-set-character-data-handler
Groups: php.notes 
Request: Send a blank email to php-notes+get-84912@lists.php.net to get a copy of this message
re. to Philippe Marc , and karuna_gadde examples i found out that the xml_set_character_data_handler call back function can be called more often for the same element in particular the content is just a few chars long (happen on windows) so a check up can give you the answer an may be for long strings too. eg: <?php xml_set_character_data_handler($this->parser, "cdata"); //... function cdata($parser, $cdata) { // ... if(isset($this->data[$this->currentItem][$this->currentField])) { $this->data[$this->currentItem][$this->currentField] .= $cdata; } else { $this->data[$this->currentItem][$this->currentField] = $cdata; } ?> ---- Manual Page -- http://www.php.net/manual/en/function.xml-set-character-data-handler.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+49943 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49943&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49943&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49943&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49943&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49943&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+49943&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#84912) next »