$name,"attrs"=>$attrs); array_push($struct,$tag); } function data($parser, $data) { global $struct,$i; if(trim($data)) { $struct[count($struct)-1]['data']=$data; } } function endElement($parser, $name) { global $struct; $struct[count($struct)-2]['child'][] = $struct[count($struct)-1]; array_pop($struct); } # Funzione che parsa il file passatogli nell'argomento e restituisce # una struttura ad albero oggetti-array contenente il documento function parse_file($file) { global $struct; $xml_parser = xml_parser_create(); xml_set_element_handler($xml_parser, "startElement", "endElement"); xml_set_character_data_handler($xml_parser, "data"); $parse = xml_parse($xml_parser,file_get_contents($file)); if(!$parse) { die("XML parsing error"); xml_parser_free($xml_parser); } return $struct; } ?> $name,"attrs"=>$attrs); array_push($struct1,$tag); } function data1($parser, $data) { global $struct1,$i; if(trim($data)) { $struct1[count($struct1)-1]['data']=$data; } } function endElement1($parser, $name) { global $struct1; $struct1[count($struct1)-2]['child'][] = $struct1[count($struct1)-1]; array_pop($struct1); } # Funzione che parsa il file passatogli nell'argomento e restituisce # una struttura ad albero oggetti-array contenente il documento function parse_file1($file) { global $struct1; $xml_parser = xml_parser_create(); xml_set_element_handler($xml_parser, "startElement1", "endElement1"); xml_set_character_data_handler($xml_parser, "data1"); $parse = xml_parse($xml_parser,file_get_contents($file)); if(!$parse) { die("XML parsing error"); xml_parser_free($xml_parser); } return $struct1; } ?> Florence Direct Hotels
La sicurezza relativa alle informazioni di carattere personale é una delle nostre priorità nell'utilizzo di internet. Al fine di proteggere Voi ed i vostri dati e per garantire la vostra privacy, utilizziamo le migliori tecnologie disponibili di SSL.



FAQ