XML arrays...Help!

Hope someone can point me in the right direction, this is my first time attempting to user arrays and im having a bit of trouble…

I, trying to create a mp3 player from an xml feed, the feed contains total 200 tracks, with 10 genres, each containing 20 tracks. All the individual data for each track is held within .attributes of a single node, including the ID for the associated genre.

What i need to do, is build an array for each genre. I’ve managed to seperate the genres using the code below, but it doesn’t seem to be creating an array of the data??? When i trace the Pop array below, flash outputs the list of tracks i need, but if i try and access a specific track from that list using trace(Pop[1]); for example, it outputs “undefined” 20 times. Any help would be most appreciated. Thanks!


stop();
playlist = new XML();
playlist.ignoreWhite = true;
playlist.onLoad = function(success) {
    if (success) {

        var PlayerFeed = playlist.firstChild.firstChild.firstChild.childNodes;

        for (var i = 0; i<PlayerFeed.length; i++) {
            
            var EachTrack = PlayerFeed*;
            var GenreGroup = EachTrack.attributes.GenreGroupID;
                        

            if (GenreGroup == 1) {
                var Pop:Array = EachTrack;
                trace(Pop);
                                                
            }
            if (GenreGroup == 2) {
                var Rock:Array = EachTrack;
            }
            if (GenreGroup == 3) {
                var Urban:Array = EachTrack;
            }
            if (GenreGroup == 4) {
                var Country:Array = EachTrack;
            }
            if (GenreGroup == 5) {
                var JazzBlues:Array = EachTrack;
            }
            if (GenreGroup == 6) {
                var Dance:Array = EachTrack;
            }
            if (GenreGroup == 7) {
                var EasyListening:Array = EachTrack;
            }
            if (GenreGroup == 8) {
                var Meta:Array = EachTrack;
            }
            if (GenreGroup == 9) {
                var World:Array = EachTrack;
            }
            if (GenreGroup == 10) {
                var Classical:Array = EachTrack;
            }

        }

    } else {
        trace("Error Loading XML");
    }

};
        
playlist.load("MusicPlayer.xml");