Varf�r f�r jag inte detta att funkaphp xmlize()
<code>
function xmlize($data) {
$data = trim($data);
$vals = $index = $array = array();
$parser = xml_parser_create();
xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
xml_parse_into_struct($parser, $data, $vals, $index);
xml_parser_free($parser);
$i = 0;
$tagname = $vals[$i]['tag'];
if ( isset ($vals[$i]['attributes'] ) )
{
$array[$tagname]['@'] = $vals[$i]['attributes'];
} else {
$array[$tagname]['@'] = array();
}
$array[$tagname]["#"] = xml_depth($vals, $i);
return $array;
}
</code>
och jag f�rs�ker anropa den s� h�r:
<code>
$file = "mast.xml";
'h�r nedanf�r kommer felet
$master xmlize($file);
</code>
men jag f�r:
Parse error: parse error in /docs/phptest/topp.php on line 161
hur ska jag g�ra?
f�r mer info om xmlize kolla h�r
http://www.hansanderson.com/php/xml/
mvh icaaq