xml_set_character_data_handler()

It set up character data handler

Example

<?php
$parser=xml_parser_create();
function func($parser,$val) {
echo $val;
}
xml_set_character_data_handler($parser,”func”);
$fp=fopen(“book.xml”,”r”);
while ($data=fread($fp,4096)){
xml_parse($parser,$data,feof($fp)) ;
}
xml_parser_free($parser);
?>

Share