写自己的rss
来源:互联网 发布:淘宝直播权限被清退 编辑:程序博客网 时间:2024/04/28 01:03
采用RSS订阅每个类别最新文档
我查了下资料,发现有个rsslibj的开源工具可以帮助我们写自己的rss文档
当然,我这里讲的是java的实现。
首先去下载个rsslibj的包:
http://sourceforge.net/project/showfiles.php?group_id=71153
参考官方网站的例子程序
import com.rsslibj.elements.Channel;
public class Writer {
public static void main(String[] args)
throws InstantiationException, ClassNotFoundException,
IllegalAccessException {
Channel channel=new Channel();
channel.setDescription("This is my sample channel.");
channel.setLink("http://localhost/");
channel.setTitle("My Channel");
channel.setImage("http://localhost/",
"The Channel Image",
"http://localhost/foo.jpg");
channel.setTextInput("http://localhost/search",
"Search The Channel Image",
"The Channel Image",
"s");
channel.addItem("http://localhost/item1",
"The First Item covers details on the first item>",
"The First Item")
.setDcContributor("Joseph B. Ottinger");
channel.addItem("http://localhost/item2",
"The Second Item covers details on the second item",
"The Second Item")
.setDcCreator("Jason Bell");
System.out.println("The feed in RDF: "+channel.getFeed("rdf"));
}
}
开始怀疑中文会有问题(老外的软件),测试了一下居然很好,什么问题也没有。
你要是熟悉rss文档格式,很容易编写一个标准的rss的writer出来
参考:rsslibj的主页 http://enigmastation.com/rsslibj/
我查了下资料,发现有个rsslibj的开源工具可以帮助我们写自己的rss文档
当然,我这里讲的是java的实现。
首先去下载个rsslibj的包:
http://sourceforge.net/project/showfiles.php?group_id=71153
参考官方网站的例子程序
import com.rsslibj.elements.Channel;
public class Writer {
public static void main(String[] args)
throws InstantiationException, ClassNotFoundException,
IllegalAccessException {
Channel channel=new Channel();
channel.setDescription("This is my sample channel.");
channel.setLink("http://localhost/");
channel.setTitle("My Channel");
channel.setImage("http://localhost/",
"The Channel Image",
"http://localhost/foo.jpg");
channel.setTextInput("http://localhost/search",
"Search The Channel Image",
"The Channel Image",
"s");
channel.addItem("http://localhost/item1",
"The First Item covers details on the first item>",
"The First Item")
.setDcContributor("Joseph B. Ottinger");
channel.addItem("http://localhost/item2",
"The Second Item covers details on the second item",
"The Second Item")
.setDcCreator("Jason Bell");
System.out.println("The feed in RDF: "+channel.getFeed("rdf"));
}
}
开始怀疑中文会有问题(老外的软件),测试了一下居然很好,什么问题也没有。
你要是熟悉rss文档格式,很容易编写一个标准的rss的writer出来
参考:rsslibj的主页 http://enigmastation.com/rsslibj/
- 写自己的rss
- 写自己的rss
- 写自己的rss
- 写自己的rss
- 用JAVA写自己的rss
- 建立自己的RSS
- 建立自己的RSS
- 建立自己的RSS
- 建立自己的RSS
- 自己写通过repeater嵌套写的一个rss集合器(xml)
- 知道了自己博客的RSS
- 自己写了个RSS阅读器,欢迎下载使用
- 为自己的网站添加RSS功能
- 给自己的网站添加rss功能
- 为自己的网站添加RSS功能
- 为自己的网站添加RSS功能
- 写个支持RSS输出的网站
- 自己动手写一个RSS的阅读器
- 好动漫,动漫好。
- Jbuilder 9.0 打造“完美”FTP
- MP被偷,坚定学习ARM和RTOS:)
- 配置log4j错误信息Email通知
- Struts ABC
- 写自己的rss
- Oracle中的分页
- "蓝色冰点"英语俱乐部
- 动态建表(示例)
- DOMXML: Expat之外的另一选择
- fork() 进程学习
- httpd: Could not determine the server's fully qualified domain name 问题的解决
- LumaQQ启动脚本
- SSI使用详解