<xml> <truc url="http://www.flashkod.com" /> </xml>
var url:String = document.firstChild.childNodes[0].attributes.url; bouton.onPress = function() : Void { getURL(url, "_blank"); }
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionvar lireXML:XML = new XML(); lireXML.ignoreWhite = true; var sortie:String = ""; URL = ""; lireXML.onLoad = function(succes) { if (succes) { var donnees:Array = lireXML.firstChild.childNodes; for(i=0;i<donnees.length;i++) { sortie += "\n"; sortie += donnees[i].childNodes[0].firstChild.nodeValue; sortie += donnees[i].childNodes[1].firstChild.nodeValue; sortie += "\n"; sortie += donnees[i].childNodes[2].firstChild.nodeValue; } data_txt.htmlText = sortie; } else { data_txt.text = "Lecture du fichier XML impossible."; } } lireXML.load("donnees.xml");
<?xml version="1.0" encoding="UTF-8"?>
<donnees>
<titre>Auteeeeeeur</titre>
<date>Titre</date>
<![CDATAhttp://www.developpez.net/forums/newreply.php?do=newreply&noquote=1&p=4588620]>
<titre>Auteur</titre>
<date>Titre</date>
<texte>Photo</texte>
</donnees>
var url:String = document.firstChild.childNodes[0].attributes.url; bouton.onPress = function() : Void { getURL(url, "_blank"); }
var lireXML:XML = new XML(); lireXML.ignoreWhite = true; var url:String = document.firstChild.childNodes[0].attributes.url; lireXML.load("donnees.xml"); lireXML.onLoad = function(succes) { var donnees = lireXML.firstChild.childNodes; for(i=0;i<donnees.length;i++) { url += donnees[i].childNodes[0].firstChild.nodeValue; } data_txt.htmlText = url; } url.onPress = function() : Void { getURL(url, "_blank"); }
<?xml version="1.0" encoding="UTF-8"?>
<donnees>
<![CDATAhttp://www.developpez.net/forums/newreply.php?do=newreply&noquote=1&p=4588620]>
</donnees>