徐汇业大信息中心 2016-03-02
安装依赖包
npm install rsj
示例
rsj = require('rsj');//RSS as JSON when use it we must (npm install rsj) first rsj.r2j('http://news.ifeng.com/pubres/rss/opinion/phjd/feed.xml',function(json) { var obj = eval('(' + json + ')');//js原生方法 //var obj = JSON.parse(json);//json.js包 res.render('index', { title: 'testbook',layout:'layout',nav:'index',rssData:obj}); });