<parse_channel>
<![CDATA[
function getArticleFromRSSNode(artNode, channelTitle)
{
var article = new Article();
for(i in artNode.childNodes)
{
if(artNode.childNodes[i].nodeName=="pubDate") article.date = new Date(Date.parse(artNode.childNodes[i].outerText));
if(artNode.childNodes[i].nodeName=="title") article.header = artNode.childNodes[i].outerText;
if(artNode.childNodes[i].nodeName=="description") article.body = artNode.childNodes[i].outerText;
if(artNode.childNodes[i].nodeName=="link")
{
article.url = artNode.childNodes[i].outerText;
article.id = artNode.childNodes[i].outerText;
}
}
return article;
}
var urls = channel.url.split("|");
for(var k=0;k<urls.length;k++)
{
var d = new Document (urls[k]);
var channelTitle = d.getElementsByTagName("title")[0];
var news = d.getElementsByTagName("item");
for(i in news)
{
var article = getArticleFromRSSNode(news[i], channelTitle);
channel.articles.push(article);
}
}
]]>
</parse_channel>