Hello, Look the code below. The code work I can see on the screen the value of each tags (except SOFT, no need it). I'd like now put the value in a 2 dimensions array, for each tag, first cell the tag name, and the value in the second cell. Could you tell me the change to do ?
Thanks, Christian, <?php $parser = xml_parser_create(); xml_set_element_handler($parser, "startElement", "endElement"); xml_set_character_data_handler($parser, "characterData"); $filehandler = fopen("FileXML.xml", "r"); while ($data = fread($filehandler, 4096)) { xml_parse($parser, $data, feof($filehandler)); } fclose($filehandler); xml_parser_free($parser); function startElement($parser, $tag) { switch($tag){ case "SOFT": break; default : break; } } function endElement($parser, $tag) { } string function characterData($parser_instance, $xml_data) { echo $xml_data.'<br>'; } ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php