xml_set_notation_decl_handler()

It set up  notation declaration handler

Example

<?php
$parser=xml_parser_create();

function char($parser,$data){
echo $data;
}

function not_decl_func($parser,$not,$base,$sysID,$pubID) {
echo $not.$sysID.$pubID;
}

xml_set_character_data_handler($parser,”char”);
xml_set_notation_decl_handler($parser, “not_decl_func”);
$fp=fopen(“test.xml”,”r”);

while ($data=fread($fp,4096)) {
xml_parse($parser,$data,feof($fp)) or die(“Failed”);
}

xml_parser_free($parser);
?>

Share