现在的位置: 首页 > 综合 > 正文

JavaScript 解析 xml 文件 如 rss订阅

2018年04月18日 ⁄ 综合 ⁄ 共 1700字 ⁄ 字号 评论关闭

jFeed 是一个通用的 RSS/ATOM 解析器jQuery插件

 

jFeed 支持 RSS 0.91, 0.92, 1.0, 2.0 和 Atom 1.0 等格式。

使用方法:

jQuery.getFeed(options);
   
   参数:
   
   * url: the feed URL (required).
   * data: data to be sent to the server. See jQuery.ajax data property.
   * success: a function to be called if the request succeeds.
     The function gets passed one argument: the JFeed object.
   
   使用示例:
   
   jQuery.getFeed({
       url: 'rss.xml',
       success: function(feed) {
           alert(feed.title);
       }
   });

附原文件实例地址:http://download.csdn.net/source/2898662

抱歉!评论已关闭.