note 16917 deleted from function.xml-set-character-data-handler by jimw

From: Date: Sat, 08 Dec 2001 23:45:42 +0000
Subject: note 16917 deleted from function.xml-set-character-data-handler by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-22373@lists.php.net to get a copy of this message
<p> I found a simpilar solution to the multi line many function call to the data function(). My character Data handler simply saves the data as it gets called.<br> </p> function characterData($parser, $data){ global $currentData; $currentData .= $data; } <p> Then when I get an EndElement call I actually call my data function passing the entire data that I collected. Then I call my actual endElement Handler<br> </p> function endElement($parser, $name) { global $currentElement; global $currentData; if ( function_exists( $currentElement. "Data") ) { $fname = $currentElement . "Data"; $fname($currentElement, $currentData); } if ( function_exists( $name . "End") ) { $fname = $name . "End"; $fname($name); } } <p> This worked out very well for me. Jim </p>

« previous php.notes (#22373) next »