I started some development where i manually get all information from the xml file.
Here is the code.
Code:
readRss("http://www.nu.nl/deeplink_rss2/index.jsp?r=Algemeen")
function readRss( $rssUrl )
{
// get rss / xml file from internet
var newData = InternetGetData( $rssUrl )
if( !newData ) return false;
// define array
var rssArr = new Array();
rssArr['item'] = new Array();
// set main data from rss feed in array, like title / data / description
rssArr['title'] = stripFromTags( newData, '<title>', '</title>');
// There is more, but not needed right now
// fill array
var dataArr = newData.split('<item>');
for( i=1; i < dataArr.length; i++)
{
rssArr['item'][i] = new Array();
rssArr['item'][i]['title'] = stripFromTags( dataArr[i], '<title>', '</title>')
rssArr['item'][i]['link'] = stripFromTags( dataArr[i], '<link>', '</link>')
rssArr['item'][i]['description'] = stripFromTags( dataArr[i], '<description>', '</description>')
rssArr['item'][i]['pubDate'] = stripFromTags( dataArr[i], '<pubDate>', '</pubDate>')
rssArr['item'][i]['category'] = stripFromTags( dataArr[i], '<category>', '</category>')
// remove other tags 'n data :
rssArr['item'][i]['description'] = str_replace('<![CDATA[', '', rssArr['item'][i]['description'] )
rssArr['item'][i]['description'] = str_replace(']]>', '', rssArr['item'][i]['description'] )
}
// return full rss array
return rssArr;
}
// strip text from two tags : <title>text</title>
function stripFromTags(input, startTag, endTag)
{
return input.split(startTag, 1)[1].split(endTag, 1)[0];
}
// string functions
function str_replace(findThis, replaceWith, str)
{
return str.toString().split(findThis).join(replaceWith);
}
This seems to work, on a very basic level..
Anybody some comments ? They're welcome!