XML becamed popular in combination with Flash, so i started to study, but i can’t find a way to solve a problem, maybe someone could help me.
i have an xml file with this structure:
<?xml version="1.0" encoding="utf-8" ?>
<data>
<mp3>
<mp3_item>
<album_title>Pop Radio</album_title>
<artist_title>Anna Polanski</artist_title>
<track_title>Blush</track_title>
<genre_title>Pop</genre_title>
</mp3_item>
<mp3_item>
<album_title>Pop Radio</album_title>
<artist_title>Anna Polanski</artist_title>
<track_title>Blush</track_title>
<genre_title>Pop</genre_title>
</mp3_item>
</mp3>
</data>
my AS look like this:
myXML = new XML();
myXML.onLoad = myLoad;
myXML.load("doremi_songs.xml");
function myLoad(ok) {
if (ok == true) {
rootNode = myXML.firstChild;
totalSlides = rootNode.childNodes.length;
trace(totalSlides); // return 0 !
} else {
txt.htmlText = " <b>ERROR!!</b>;
}
}
I just don’t understand, how to make a list of these items! Could anyone help me? I read all the topics i could find, but they don’t seem to work:(
Help anyone?