/** * Parses ATOM feeds and returns an indexed array with all elements. * * @author Jeroen Wijering * @version 1.1 **/ import com.jeroenwijering.feeds.AbstractParser; import com.jeroenwijering.utils.StringMagic; class com.jeroenwijering.feeds.XSPFParser extends AbstractParser { /** Contructor **/ function XSPFParser(enc:Boolean,pre:String) { super(enc,pre); }; /** build an array with all regular elements **/ private function setElements() { elements = new Object(); elements["title"] = "title"; elements["creator"] = "author"; elements["info"] = "link"; elements["image"] = "image"; elements["identifier"] = "id"; elements["album"] = "category"; }; /** Convert ATOM structure to array **/ private function parse(xml:XML):Array { var arr = new Array(); var tpl = xml.firstChild.firstChild; while(tpl != null) { if (tpl.nodeName == 'trackList') { for(var i=0; i