voila j'ai regardé sur plusieurs sites comment lire une valeur d'un fichier xml, mais j'ai du rater quelque chose...
Car j'ai l'erreur suivante :
Warning: domxml_open_file(): I/O in e:\developpement\TOOLS\fonctionxml.php on line 39

Warning: domxml_open_file(): warning : in e:\developpement\TOOLS\fonctionxml.php on line 39

Warning: domxml_open_file(): failed to load external entity "contact.xml" in e:\developpement\TOOLS\fonctionxml.php on line 39
voici le code utilisé :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
function lirenbchamp($FXML) 
 {
 	$FXML='contact.xml';
 	if ($dom=domxml_open_file($FXML)) 
	{
		$calcX = xpath_new_context($dom);
		return xpath_eval("//contact/list/nbchamp/text()",$calcX);
	} else {
   		exit('fichier '.$FXML.' non trouvé, veuillez contacter votre administrateur');
	}
 }
pour info, j'utilise PHP4.3
merci d'avance