そのため、XML ファイルを as3 にロードしたところ、正しくロードされ、トレースできるので正しいファイルであることがわかりますが、特定のノードをトレースしようとすると、出力ウィンドウが空のままになります。これが私のコードです:
var _textes:XML;
loader = new URLLoader();
requete = new URLRequest("texte_fr.xml");
loader.load(requete);
loader.addEventListener(Event.COMPLETE, finChargement);
function finChargement(pEvt:Event){
_textes= new XML(pEvt.target.data);
}
_textes をトレースすると、すべての XML コードが表示されますが、XML ファイル内のノードをトレースしようとすると、何も表示されません。たとえば、_textes.instructions をトレースしようとすると、何も表示されません。私は何を間違っていますか?ここに私のXMLファイルがあります:
<?xml version="1.0" encoding="utf-8"?>
<textes version="1" xmlns="http://xspf.org/ns/0/">
<instructions>
Some text
</instructions>
<niveau1>
<reussi>
Some other text
</reussi>
<fail>
Some other text
</fail>
</niveau1>
<niveau2>
<reussi>
Some other text
</reussi>
<fail>
Some other text
</fail>
</niveau2>
<niveau3>
<reussi>
Some other text
</reussi>
<fail>
Some other text
</fail>
</niveau3>
<perdu>
Some other text
</perdu>
<general>
Some other text
</general>
<boutons>
Some other text
</boutons>
</textes>