XMLParser
Kind of class: | class |
---|---|
Inherits from: | none |
Version: | 1.16 |
Author: | Jeroen Wijering |
Classpath: | com.jeroenwijering.utils.XMLParser |
File last modified: | Wednesday, 06 December 2006, 16:14:10 |
Parses RSS, ATOM, XSPF and general XML lists and returns it as an array.
RSS and XSPF are returned in a numerical array with these items:
[title,author,file,link,image,category,id,start(XSPF),end(XSPF),description(RSS),date(RSS),latitude(RSS),longitude(RSS)]
Other XML lists (1 or 2 levels deep) are loaded 1 on 1 into the array.
An onParseComplete event is broadcasted upon succesful completion.
Example:
parseObj = new com.jeroenwijering.utils.XMLParser();
parseObj.onParseComplete = function() { trace(this.parseArray.length); };
parseObj.parse("http://www.jeroenwijering.com/rss/");
parseObj.onParseComplete = function() { trace(this.parseArray.length); };
parseObj.parse("http://www.jeroenwijering.com/rss/");
Summary
Constructor
Instance properties
Instance methods
Event handlers
Constructor
XMLParser
function XMLParser (
)
Nothing there.
Instance properties
parseArray
parseArray:Array
(read,write)
The array the XML is parsed into
Instance methods
parse
function parse (
url:String) : Void
Parse an XML list.
Parameters:
url:
URL of the playlist that should be parsed.
rst:
Optional filetypes the parser should restrict to (eg: ['.mp3','.jpg']).
Event handlers
onParseComplete
function onParseComplete (
)
Invoked when parsing is completed.