ho fatto una prova usando come esempio questo xml:
Codice PHP:
<?xml version="1.0" encoding="iso-8859-1"?>
<test>
<item attr1="ciao" attr2="mondo" attr3="questo" attr4="è" attr5="un" attr6="test">Test</item>
</test>
e questo codice actionscript:
Codice PHP:
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function(s) {
if(s){
var temp:Array = this.firstChild.childNodes;
for(var i:Number = 0; i < temp.length; i++){
for(var prop in temp[i].attributes) {
trace(prop+": "+temp[i].attributes[prop]);
}
}
}
}
xml.load("test.xml");
e in output in flash mi vengono stampati correttamente i nomi e i valori degli attributi del nodo
Codice PHP:
attr1: ciao
attr2: mondo
attr3: questo
attr4: è
attr5: un
attr6: test
verifica di aver salvato l'xml con codifica Unicode o UTF-8, è importante