er is een probleem met mij xml include file.
Omdat ik meerdere files download en dus deze file
meerdere malen worden gelezen krijg ik de melding:
Warning: xml_parse(): Unable to call handler cdata() in
en
Warning: xml_parse(): Unable to call handler tag_open()
de file welke wordt geincluded is deze:
<?
class xml
{
var $parser;
function xml()
{
$this->parser = xml_parser_create();
xml_set_object($this->parser, &$this);
xml_set_element_handler($this->parser, "tag_open", "tag_close");
xml_set_character_data_handler($this->parser, "cdata");
}
function parse($data)
{
xml_parse($this->parser, $data);
}
function tag_open($parser, $tag, $attributes)
{
global $alltags;
$alltags[] = $tag;
//var_dump($parser, $tag, $attributes);
}
function cdata($parser, $cdata)
{
global $alltags;
$alltags[] = $cdata;
//var_dump($parser, $cdata);
}
function tag_close($parser, $tag)
{
global $alltags;
$alltags[] = 'CLOSE'.$tag;
//var_dump($parser, $tag);
}
} //end of class xml
?>
de manier waarom ik include is:
include_once("./include/xmlclass2.php");
echter als ik include zonder "_once" dus:
include("./include/xmlclass2.php");
dan krijg ik de melding:
wie kan me ff uit de brand helpen...
Thanks
Tim
979 views