- 浏览: 413887 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (184)
- IDE (4)
- dotCMS (3)
- Liferay Portal (1)
- J2EE (7)
- My SQL (16)
- IBM DB2 (3)
- Oracle (2)
- JDBC (4)
- Hibernate (3)
- JSP (0)
- Framework (4)
- Java编程 (30)
- C++编程 (0)
- Struts 1.X (2)
- Struts 2.X (6)
- Linux (11)
- Spring (7)
- JavaScript (6)
- Ajax (2)
- XML (3)
- IBM Websphere Portal (1)
- IBM Lotus Quickr (1)
- CMS (2)
- ERP (0)
- CRM (0)
- 大型网站架构开发 (1)
- 面试武器 (2)
- HTML 5 (2)
- dTree && webFxloadTree (2)
- JVM (7)
- SQL Server (3)
- Tomcat && Apache && Jboss && Weblogic-中间件 (4)
- FreeMarker (2)
- MongoDB (7)
- OpenSource开源 (24)
- Cloud (0)
- FFmpeg (3)
- Thrift (1)
- SpringSide (1)
- Design Pattern (1)
- solr&&ES (2)
- git&svn (1)
- 大数据 (8)
- 人工智能 (0)
- Hadoop (3)
- Spark (0)
- Sqoop (1)
- Flume (1)
- Hive (3)
- HDFS (4)
- ES (0)
- Redis (1)
- Kafka (3)
- MR (0)
- 机器学习 (0)
- 深度学习 (0)
- Impala (2)
- HBase (2)
- Spring Boot (1)
- Spring Cloud (0)
- 大数据架构 (6)
- 架构思想理论 (6)
- 技术管理 (4)
- 数据结构与算法 (4)
最新评论
-
huijz:
...
Spring Data JPA研究-使用Spring Data JPA 简化JPA 开发(ZZ) -
用户名不存在:
[img][/img][*]引用[u][/u][i][/i][ ...
MongoDB 模糊查询的三种实现方式-morphia实现 -
junsheng100:
请给个完整的例子吧!包括jar文件等
java调用ffmpeg获取视频文件信息参数代码 -
mj:
谢谢!!
SQL Server里面如何导出包含(insert into)数据的SQL脚本 (转载ZZ)
1.通过Rome插件可以简化对这两种规范文件的解析难度!Rss,Atom一般用在网站订阅功能,可以实现网络资源共享,用户可以通过客户端软件直接浏览各大网站已订阅的文章。简单的来说,电子订阅的特点就是,可以将多个网站上频繁更新的内容如:博客,新闻,聚合到一个网页列表上。ff可以下载sage插件解析,IE7可以直接解析。以下是读写操作的代码示例:
Java代码
1.package rss;
2.
3.import java.io.FileWriter;
4.import java.io.Writer;
5.import java.text.DateFormat;
6.import java.text.SimpleDateFormat;
7.import java.util.ArrayList;
8.import java.util.Date;
9.import java.util.List;
10.
11.import com.sun.syndication.feed.synd.SyndContent;
12.import com.sun.syndication.feed.synd.SyndContentImpl;
13.import com.sun.syndication.feed.synd.SyndEntry;
14.import com.sun.syndication.feed.synd.SyndEntryImpl;
15.import com.sun.syndication.feed.synd.SyndFeed;
16.import com.sun.syndication.feed.synd.SyndFeedImpl;
17.import com.sun.syndication.io.SyndFeedOutput;
18.
19.public class RssWrite {
20.
21. public static void main(String[] args) throws Exception {
22. DateFormat dateParser = new SimpleDateFormat("yyyyMMddhhmmss");
23.
24. SyndFeed feed = new SyndFeedImpl();
25. feed.setFeedType("atom_1.0");
26. feed.setTitle("Sample Feed (created with Rome)");
27. feed.setLink("http://rome.dev.java.net");
28. feed.setDescription("This feed has been created using Rome (Java syndication utilities");
29. feed.setEncoding("utf-8");//默认是utf-8
30.
31. List entries = new ArrayList();
32. SyndEntry entry;
33. SyndContent description;
34.
35. entry = new SyndEntryImpl(); // feed其中的一个 entry, 即其中一篇文章
36.
37. entry.setTitle("Rome v1.0"); // 设置文章标题
38. entry.setLink("http://wiki.java.net/bin/view/Javawsxml/Rome01");
39. entry.setPublishedDate(new Date());
40. description = new SyndContentImpl(); // 文章的描述
41. description.setType("text/plain");
42. description.setValue("hello caohaigang");
43. entry.setDescription(description);
44. entries.add(entry);
45.
46. entry = new SyndEntryImpl();
47. entry.setTitle("Rome v1.0");
48. entry.setLink("http://wiki.java.net/bin/view/Javawsxml/Rome01");
49. entry.setPublishedDate(new Date());
50. description = new SyndContentImpl();
51. description.setType("text/plain");
52. description.setValue("<img src=\"http://farm4.static.flickr.com/3026/2645744338_bf6a7e9c57_m.jpg\" />");
53. entry.setDescription(description);
54. entries.add(entry);
55.
56. feed.setEntries(entries); // 设置feed的文章列表
57. String path = "c:/xml";
58. File f = new File(path);
59. if(!f.exists()){
60. f.mkdirs();
61. }
62. String fileName = dateParser.format(new Date())+".xml";
63. //FileWriter输出的XML文件为gb2312编码,这在linux下无法使用
64. //Writer writer = new FileWriter(path + "/" + fileName);
65. //要和正文编码设置一致
66. Writer writer = new OutputStreamWriter(new FileOutputStream(fileName), "UTF-8");
67. SyndFeedOutput output = new SyndFeedOutput();
68. output.output(feed,writer); // 向客户端输出xml
69. writer.close();
70.
71. System.out.println("The feed has been written to the file ["+fileName+"]");
72. }
73.}
package rss;
import java.io.FileWriter;
import java.io.Writer;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import com.sun.syndication.feed.synd.SyndContent;
import com.sun.syndication.feed.synd.SyndContentImpl;
import com.sun.syndication.feed.synd.SyndEntry;
import com.sun.syndication.feed.synd.SyndEntryImpl;
import com.sun.syndication.feed.synd.SyndFeed;
import com.sun.syndication.feed.synd.SyndFeedImpl;
import com.sun.syndication.io.SyndFeedOutput;
public class RssWrite {
public static void main(String[] args) throws Exception {
DateFormat dateParser = new SimpleDateFormat("yyyyMMddhhmmss");
SyndFeed feed = new SyndFeedImpl();
feed.setFeedType("atom_1.0");
feed.setTitle("Sample Feed (created with Rome)");
feed.setLink("http://rome.dev.java.net");
feed.setDescription("This feed has been created using Rome (Java syndication utilities");
feed.setEncoding("utf-8");//默认是utf-8
List entries = new ArrayList();
SyndEntry entry;
SyndContent description;
entry = new SyndEntryImpl(); // feed其中的一个 entry, 即其中一篇文章
entry.setTitle("Rome v1.0"); // 设置文章标题
entry.setLink("http://wiki.java.net/bin/view/Javawsxml/Rome01");
entry.setPublishedDate(new Date());
description = new SyndContentImpl(); // 文章的描述
description.setType("text/plain");
description.setValue("hello caohaigang");
entry.setDescription(description);
entries.add(entry);
entry = new SyndEntryImpl();
entry.setTitle("Rome v1.0");
entry.setLink("http://wiki.java.net/bin/view/Javawsxml/Rome01");
entry.setPublishedDate(new Date());
description = new SyndContentImpl();
description.setType("text/plain");
description.setValue("<img src=\"http://farm4.static.flickr.com/3026/2645744338_bf6a7e9c57_m.jpg\" />");
entry.setDescription(description);
entries.add(entry);
feed.setEntries(entries); // 设置feed的文章列表
String path = "c:/xml";
File f = new File(path);
if(!f.exists()){
f.mkdirs();
}
String fileName = dateParser.format(new Date())+".xml";
//FileWriter输出的XML文件为gb2312编码,这在linux下无法使用
//Writer writer = new FileWriter(path + "/" + fileName);
//要和正文编码设置一致
Writer writer = new OutputStreamWriter(new FileOutputStream(fileName), "UTF-8");
SyndFeedOutput output = new SyndFeedOutput();
output.output(feed,writer); // 向客户端输出xml
writer.close();
System.out.println("The feed has been written to the file ["+fileName+"]");
}
}
Java代码
1.import com.sun.syndication.feed.synd.SyndEntry;
2.import com.sun.syndication.feed.synd.SyndFeed;
3.import com.sun.syndication.fetcher.FeedFetcher;
4.import com.sun.syndication.fetcher.impl.FeedFetcherCache;
5.import com.sun.syndication.fetcher.impl.HashMapFeedInfoCache;
6.import com.sun.syndication.fetcher.impl.HttpURLFeedFetcher;
7.
8.public class RssReader {
9.
10. public static void main(String[] args) throws Exception {
11. FeedFetcherCache feedInfoCache = HashMapFeedInfoCache.getInstance();
12. FeedFetcher feedFetcher = new HttpURLFeedFetcher(feedInfoCache);
13.
14. URL url = new URL("http://www.china-pub.com/rss/FeedPub.asp?id=3");
15. //url是XML文件, 如http://feed.feedsky.com/xxx.xml
16. SyndFeed feed = feedFetcher.retrieveFeed(url);
17. List entryList = feed.getEntries();
18. for (int i = 0; i < entryList.size(); i++) {
19. SyndEntry entry = (SyndEntry) entryList.get(i);
20. System.out.println("Published Date: " + entry.getPublishedDate());
21. System.out.println("Title: " + entry.getTitle());
22. System.out.println("Link: " + entry.getLink());
23. SyndContent sc = entry.getDescription();
24. if(sc!=null){
25. System.out.println("Description: " + sc.getValue());
26. }
27. System.out.println("------------------------------");
28. }
29. }
30.}
import com.sun.syndication.feed.synd.SyndEntry;
import com.sun.syndication.feed.synd.SyndFeed;
import com.sun.syndication.fetcher.FeedFetcher;
import com.sun.syndication.fetcher.impl.FeedFetcherCache;
import com.sun.syndication.fetcher.impl.HashMapFeedInfoCache;
import com.sun.syndication.fetcher.impl.HttpURLFeedFetcher;
public class RssReader {
public static void main(String[] args) throws Exception {
FeedFetcherCache feedInfoCache = HashMapFeedInfoCache.getInstance();
FeedFetcher feedFetcher = new HttpURLFeedFetcher(feedInfoCache);
URL url = new URL("http://www.china-pub.com/rss/FeedPub.asp?id=3");
//url是XML文件, 如http://feed.feedsky.com/xxx.xml
SyndFeed feed = feedFetcher.retrieveFeed(url);
List entryList = feed.getEntries();
for (int i = 0; i < entryList.size(); i++) {
SyndEntry entry = (SyndEntry) entryList.get(i);
System.out.println("Published Date: " + entry.getPublishedDate());
System.out.println("Title: " + entry.getTitle());
System.out.println("Link: " + entry.getLink());
SyndContent sc = entry.getDescription();
if(sc!=null){
System.out.println("Description: " + sc.getValue());
}
System.out.println("------------------------------");
}
}
}
其中FeedType为以下同种中的一种
Java代码
1.public static final String RSS_090 = "rss_0.9";
2.public static final String RSS_092 = "rss_0.92";
3.public static final String RSS_093 = "rss_0.93";
4.public static final String RSS_094 = "rss_0.94";
5.public static final String RSS_091_Netscape = "rss_0.91";
6.public static final String RSS_091_Userland = "rss_0.91";
7.public static final String RSS_100 = "rss_1.0";
8.public static final String RSS_200 = "rss_2.0";
9.public static final String ATOM_030 = "atom_0.3";
10.public static final String ATOM_100 = "atom_1.0";
public static final String RSS_090 = "rss_0.9";
public static final String RSS_092 = "rss_0.92";
public static final String RSS_093 = "rss_0.93";
public static final String RSS_094 = "rss_0.94";
public static final String RSS_091_Netscape = "rss_0.91";
public static final String RSS_091_Userland = "rss_0.91";
public static final String RSS_100 = "rss_1.0";
public static final String RSS_200 = "rss_2.0";
public static final String ATOM_030 = "atom_0.3";
public static final String ATOM_100 = "atom_1.0";
用ROME ,就可以很简单的生成rss, atom或者将rss转化成atom, 等操作..
这个插件需要3个jar包 jdom.jar rome-0.9.jar rome-fetcher-0.9.jar
2.通过rssutils插件可以对RssXml进行读操作,引入jar包之后直接可以通过在jsp页写标签进行输出,优点:使用简单。缺点:仅仅只能对RssXml文件进行读取操作。
Xml代码
1.<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
2.<%@ taglib uri="/WEB-INF/rssutils.tld" prefix="rss" %>
3.
4.<rss:feed
5.url="http://dev.csdn.net/rss/2.xml"
6.feedId="example1"/>
7.<b>Image: </b><rss:channelImage feedId="example1" asLink="true"/><br>
8.<b>Title: </b><rss:channelTitle feedId="example1"/><br>
9.<b>Link: </b><rss:channelLink feedId="example1" asLink="true"/><br>
10.<b>Description: </b><rss:channelDescription feedId="example1"/><br>
11.<ul>
12. <rss:forEachItem feedId="example1">
13. <li><rss:itemTitle feedId="example1"/><br>
14. <rss:itemLink feedId="example1"/><br>
15. <rss:itemDescription feedId="example1"/><br>
16. </rss:forEachItem>
17.</ul>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/WEB-INF/rssutils.tld" prefix="rss" %>
<rss:feed
url="http://dev.csdn.net/rss/2.xml"
feedId="example1"/>
<b>Image: </b><rss:channelImage feedId="example1" asLink="true"/><br>
<b>Title: </b><rss:channelTitle feedId="example1"/><br>
<b>Link: </b><rss:channelLink feedId="example1" asLink="true"/><br>
<b>Description: </b><rss:channelDescription feedId="example1"/><br>
<ul>
<rss:forEachItem feedId="example1">
<li><rss:itemTitle feedId="example1"/><br>
<rss:itemLink feedId="example1"/><br>
<rss:itemDescription feedId="example1"/><br>
</rss:forEachItem>
</ul>
需要rssutils.jar
Java代码
1.package rss;
2.
3.import java.io.FileWriter;
4.import java.io.Writer;
5.import java.text.DateFormat;
6.import java.text.SimpleDateFormat;
7.import java.util.ArrayList;
8.import java.util.Date;
9.import java.util.List;
10.
11.import com.sun.syndication.feed.synd.SyndContent;
12.import com.sun.syndication.feed.synd.SyndContentImpl;
13.import com.sun.syndication.feed.synd.SyndEntry;
14.import com.sun.syndication.feed.synd.SyndEntryImpl;
15.import com.sun.syndication.feed.synd.SyndFeed;
16.import com.sun.syndication.feed.synd.SyndFeedImpl;
17.import com.sun.syndication.io.SyndFeedOutput;
18.
19.public class RssWrite {
20.
21. public static void main(String[] args) throws Exception {
22. DateFormat dateParser = new SimpleDateFormat("yyyyMMddhhmmss");
23.
24. SyndFeed feed = new SyndFeedImpl();
25. feed.setFeedType("atom_1.0");
26. feed.setTitle("Sample Feed (created with Rome)");
27. feed.setLink("http://rome.dev.java.net");
28. feed.setDescription("This feed has been created using Rome (Java syndication utilities");
29. feed.setEncoding("utf-8");//默认是utf-8
30.
31. List entries = new ArrayList();
32. SyndEntry entry;
33. SyndContent description;
34.
35. entry = new SyndEntryImpl(); // feed其中的一个 entry, 即其中一篇文章
36.
37. entry.setTitle("Rome v1.0"); // 设置文章标题
38. entry.setLink("http://wiki.java.net/bin/view/Javawsxml/Rome01");
39. entry.setPublishedDate(new Date());
40. description = new SyndContentImpl(); // 文章的描述
41. description.setType("text/plain");
42. description.setValue("hello caohaigang");
43. entry.setDescription(description);
44. entries.add(entry);
45.
46. entry = new SyndEntryImpl();
47. entry.setTitle("Rome v1.0");
48. entry.setLink("http://wiki.java.net/bin/view/Javawsxml/Rome01");
49. entry.setPublishedDate(new Date());
50. description = new SyndContentImpl();
51. description.setType("text/plain");
52. description.setValue("<img src=\"http://farm4.static.flickr.com/3026/2645744338_bf6a7e9c57_m.jpg\" />");
53. entry.setDescription(description);
54. entries.add(entry);
55.
56. feed.setEntries(entries); // 设置feed的文章列表
57. String path = "c:/xml";
58. File f = new File(path);
59. if(!f.exists()){
60. f.mkdirs();
61. }
62. String fileName = dateParser.format(new Date())+".xml";
63. //FileWriter输出的XML文件为gb2312编码,这在linux下无法使用
64. //Writer writer = new FileWriter(path + "/" + fileName);
65. //要和正文编码设置一致
66. Writer writer = new OutputStreamWriter(new FileOutputStream(fileName), "UTF-8");
67. SyndFeedOutput output = new SyndFeedOutput();
68. output.output(feed,writer); // 向客户端输出xml
69. writer.close();
70.
71. System.out.println("The feed has been written to the file ["+fileName+"]");
72. }
73.}
package rss;
import java.io.FileWriter;
import java.io.Writer;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import com.sun.syndication.feed.synd.SyndContent;
import com.sun.syndication.feed.synd.SyndContentImpl;
import com.sun.syndication.feed.synd.SyndEntry;
import com.sun.syndication.feed.synd.SyndEntryImpl;
import com.sun.syndication.feed.synd.SyndFeed;
import com.sun.syndication.feed.synd.SyndFeedImpl;
import com.sun.syndication.io.SyndFeedOutput;
public class RssWrite {
public static void main(String[] args) throws Exception {
DateFormat dateParser = new SimpleDateFormat("yyyyMMddhhmmss");
SyndFeed feed = new SyndFeedImpl();
feed.setFeedType("atom_1.0");
feed.setTitle("Sample Feed (created with Rome)");
feed.setLink("http://rome.dev.java.net");
feed.setDescription("This feed has been created using Rome (Java syndication utilities");
feed.setEncoding("utf-8");//默认是utf-8
List entries = new ArrayList();
SyndEntry entry;
SyndContent description;
entry = new SyndEntryImpl(); // feed其中的一个 entry, 即其中一篇文章
entry.setTitle("Rome v1.0"); // 设置文章标题
entry.setLink("http://wiki.java.net/bin/view/Javawsxml/Rome01");
entry.setPublishedDate(new Date());
description = new SyndContentImpl(); // 文章的描述
description.setType("text/plain");
description.setValue("hello caohaigang");
entry.setDescription(description);
entries.add(entry);
entry = new SyndEntryImpl();
entry.setTitle("Rome v1.0");
entry.setLink("http://wiki.java.net/bin/view/Javawsxml/Rome01");
entry.setPublishedDate(new Date());
description = new SyndContentImpl();
description.setType("text/plain");
description.setValue("<img src=\"http://farm4.static.flickr.com/3026/2645744338_bf6a7e9c57_m.jpg\" />");
entry.setDescription(description);
entries.add(entry);
feed.setEntries(entries); // 设置feed的文章列表
String path = "c:/xml";
File f = new File(path);
if(!f.exists()){
f.mkdirs();
}
String fileName = dateParser.format(new Date())+".xml";
//FileWriter输出的XML文件为gb2312编码,这在linux下无法使用
//Writer writer = new FileWriter(path + "/" + fileName);
//要和正文编码设置一致
Writer writer = new OutputStreamWriter(new FileOutputStream(fileName), "UTF-8");
SyndFeedOutput output = new SyndFeedOutput();
output.output(feed,writer); // 向客户端输出xml
writer.close();
System.out.println("The feed has been written to the file ["+fileName+"]");
}
}
Java代码
1.import com.sun.syndication.feed.synd.SyndEntry;
2.import com.sun.syndication.feed.synd.SyndFeed;
3.import com.sun.syndication.fetcher.FeedFetcher;
4.import com.sun.syndication.fetcher.impl.FeedFetcherCache;
5.import com.sun.syndication.fetcher.impl.HashMapFeedInfoCache;
6.import com.sun.syndication.fetcher.impl.HttpURLFeedFetcher;
7.
8.public class RssReader {
9.
10. public static void main(String[] args) throws Exception {
11. FeedFetcherCache feedInfoCache = HashMapFeedInfoCache.getInstance();
12. FeedFetcher feedFetcher = new HttpURLFeedFetcher(feedInfoCache);
13.
14. URL url = new URL("http://www.china-pub.com/rss/FeedPub.asp?id=3");
15. //url是XML文件, 如http://feed.feedsky.com/xxx.xml
16. SyndFeed feed = feedFetcher.retrieveFeed(url);
17. List entryList = feed.getEntries();
18. for (int i = 0; i < entryList.size(); i++) {
19. SyndEntry entry = (SyndEntry) entryList.get(i);
20. System.out.println("Published Date: " + entry.getPublishedDate());
21. System.out.println("Title: " + entry.getTitle());
22. System.out.println("Link: " + entry.getLink());
23. SyndContent sc = entry.getDescription();
24. if(sc!=null){
25. System.out.println("Description: " + sc.getValue());
26. }
27. System.out.println("------------------------------");
28. }
29. }
30.}
import com.sun.syndication.feed.synd.SyndEntry;
import com.sun.syndication.feed.synd.SyndFeed;
import com.sun.syndication.fetcher.FeedFetcher;
import com.sun.syndication.fetcher.impl.FeedFetcherCache;
import com.sun.syndication.fetcher.impl.HashMapFeedInfoCache;
import com.sun.syndication.fetcher.impl.HttpURLFeedFetcher;
public class RssReader {
public static void main(String[] args) throws Exception {
FeedFetcherCache feedInfoCache = HashMapFeedInfoCache.getInstance();
FeedFetcher feedFetcher = new HttpURLFeedFetcher(feedInfoCache);
URL url = new URL("http://www.china-pub.com/rss/FeedPub.asp?id=3");
//url是XML文件, 如http://feed.feedsky.com/xxx.xml
SyndFeed feed = feedFetcher.retrieveFeed(url);
List entryList = feed.getEntries();
for (int i = 0; i < entryList.size(); i++) {
SyndEntry entry = (SyndEntry) entryList.get(i);
System.out.println("Published Date: " + entry.getPublishedDate());
System.out.println("Title: " + entry.getTitle());
System.out.println("Link: " + entry.getLink());
SyndContent sc = entry.getDescription();
if(sc!=null){
System.out.println("Description: " + sc.getValue());
}
System.out.println("------------------------------");
}
}
}
其中FeedType为以下同种中的一种
Java代码
1.public static final String RSS_090 = "rss_0.9";
2.public static final String RSS_092 = "rss_0.92";
3.public static final String RSS_093 = "rss_0.93";
4.public static final String RSS_094 = "rss_0.94";
5.public static final String RSS_091_Netscape = "rss_0.91";
6.public static final String RSS_091_Userland = "rss_0.91";
7.public static final String RSS_100 = "rss_1.0";
8.public static final String RSS_200 = "rss_2.0";
9.public static final String ATOM_030 = "atom_0.3";
10.public static final String ATOM_100 = "atom_1.0";
public static final String RSS_090 = "rss_0.9";
public static final String RSS_092 = "rss_0.92";
public static final String RSS_093 = "rss_0.93";
public static final String RSS_094 = "rss_0.94";
public static final String RSS_091_Netscape = "rss_0.91";
public static final String RSS_091_Userland = "rss_0.91";
public static final String RSS_100 = "rss_1.0";
public static final String RSS_200 = "rss_2.0";
public static final String ATOM_030 = "atom_0.3";
public static final String ATOM_100 = "atom_1.0";
用ROME ,就可以很简单的生成rss, atom或者将rss转化成atom, 等操作..
这个插件需要3个jar包 jdom.jar rome-0.9.jar rome-fetcher-0.9.jar
2.通过rssutils插件可以对RssXml进行读操作,引入jar包之后直接可以通过在jsp页写标签进行输出,优点:使用简单。缺点:仅仅只能对RssXml文件进行读取操作。
Xml代码
1.<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
2.<%@ taglib uri="/WEB-INF/rssutils.tld" prefix="rss" %>
3.
4.<rss:feed
5.url="http://dev.csdn.net/rss/2.xml"
6.feedId="example1"/>
7.<b>Image: </b><rss:channelImage feedId="example1" asLink="true"/><br>
8.<b>Title: </b><rss:channelTitle feedId="example1"/><br>
9.<b>Link: </b><rss:channelLink feedId="example1" asLink="true"/><br>
10.<b>Description: </b><rss:channelDescription feedId="example1"/><br>
11.<ul>
12. <rss:forEachItem feedId="example1">
13. <li><rss:itemTitle feedId="example1"/><br>
14. <rss:itemLink feedId="example1"/><br>
15. <rss:itemDescription feedId="example1"/><br>
16. </rss:forEachItem>
17.</ul>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/WEB-INF/rssutils.tld" prefix="rss" %>
<rss:feed
url="http://dev.csdn.net/rss/2.xml"
feedId="example1"/>
<b>Image: </b><rss:channelImage feedId="example1" asLink="true"/><br>
<b>Title: </b><rss:channelTitle feedId="example1"/><br>
<b>Link: </b><rss:channelLink feedId="example1" asLink="true"/><br>
<b>Description: </b><rss:channelDescription feedId="example1"/><br>
<ul>
<rss:forEachItem feedId="example1">
<li><rss:itemTitle feedId="example1"/><br>
<rss:itemLink feedId="example1"/><br>
<rss:itemDescription feedId="example1"/><br>
</rss:forEachItem>
</ul>
需要rssutils.jar
相关推荐
java使用Rome解析Rss的实例
rome-1.0RC2 source,jar and doc
利用Rome解析Rss,Rome 是 java.net 上的一个开源项目Rome需要JDK1.4以上版本和JDom.jar
RSS的一个工具类基于JAVA,可以解析URL生成XML也可以通过传参生成一个RSS,注释详细,用到ROME和JDOM技术,欢迎大家借鉴学习.
Rome是一个用于RSS和Atom提要的Java框架。框架由几个模块组成:
Rome是为RSS聚合而开发的一个框架,让你可以快速的开发基于java的RSS阅读,发布器,支持 RSS 0.91 Netscape RSS 0.91 Userland RSS 0.92 RSS 0.93 RSS 0.94 RSS 1.0 RSS 2.0 Atom 0.3 Atom 1.0
用于生成和解析RSS和Atom提要的库。 rome-modules MediaRSS,GeoRSS等扩展的生成器和解析器。 rome-opml 解析器和工具。 rome-fetcher 已弃用(有关详细信息,请参见 ) 其他不推荐使用的模块: rome-...
我的消息 RSS(丰富站点摘要); 最初是RDF网站摘要; 通常称为Really Simple Syndication,它使用一系列标准的... 该应用程序的核心是ROME XML解析器,该解析器读取提要输出xml文件并解析标记以生成新的内容和元数据
Rome是为RSS聚合而开发的一个框架,让你可以快速的开发基于java的RSS阅读,发布器,支持 RSS 0.91 Netscape RSS 0.91 Userland RSS 0.92 RSS 0.93 RSS 0.94 RSS 1.0 RSS 2.0 Atom 0.3 Atom 1.0 等标准。
RSS开源框架ROME1.0下载集合 1.rome-1.0-javadoc 2.rome-1.0-sources
在做的过程中遇到中文字符出错的问题,网上也有很多人提出来,但是好能解决的不多,如果你也遇到这个问题,请详细看本文档!
NULL 博文链接:https://chenhao-yssy.iteye.com/blog/1074264
Rome解析RSS必备jar
rome-1.0.jar jdom.jar 并提供第一个RSS发布实例 (可以使用IO流写到本地xml文件;包括所需jar包,及一个成功的实例)
RSS种子读取,频道解析,详细信息读取 根据RSSUrl获取所有List数据(Rome1.0) Rome优点:1.可扩展性好。2.功能强大,除了用来解析RSS,还可以聚合和构造RSS。 Rome缺点:1.兼容性待加强.2.绑定jdom。
开源项目,实现RSS 文件的生成和解析,RSS标准虽然混乱,但是其本质都是XML文档。
主要介绍了java中rss解析器(rome.jar和jdom.jar)示例,需要的朋友可以参考下
Rome是为RSS聚合而开发的一个框架,让你可以快速的开发基于java的RSS阅读