Fichier_XML = new XML();
Fichier_XML.ignoreWhite = true;
Fichier_XML.load("clim.xml");
Fichier_XML.onLoad = function(Reussite) {
if (Reussite) {
x = Fichier_XML.firstChild;
for(i = 0; x.childNodes[i] != undefined; i++) {
raison += + x.childNodes[i].childNodes[0].firstChild + "\n";
activite += "Secteur : " + x.childNodes[i].childNodes[1].firstChild + "\n";
adresse += "Adresse : " + x.childNodes[i].childNodes[2].firstChild;
adresse += " - " + x.childNodes[i].childNodes[3].firstChild + "\n";
fax += "Fax : " + x.childNodes[i].childNodes[5].firstChild + "\n";
nom += "Nom du contact : " + x.childNodes[i].childNodes[7].firstChild + "\n";
fonction += "fonction : " + x.childNodes[i].childNodes[8].firstChild + "\n";
num += "Téléphone personnel : " + x.childNodes[i].childNodes[9].firstChild + "\n";
email += "E-mail : " + x.childNodes[i].childNodes[10].firstChild + "\n";
}
total = "Il y a " + Fichier_XML.firstChild.childNodes.length + " entreprises.";
}
else { Voir_xml = "Erreur lors du chargement du fichier XML"; }
};
Partager