RSS 测试
来源:互联网 发布:这么把淘宝店弄上天猫 编辑:程序博客网 时间:2024/05/16 01:19
//main方法
Document document = null;
HttpClient httpClient = new HttpClient();
GetMethod getMethod = new GetMethod("http://rss.3g.qq.com/rss/info/rss.jsp?channel=news&g_from=bjuni&wap20=true");
httpClient.executeMethod(getMethod);
getMethod.getParams().setParameter(
HttpMethodParams.HTTP_CONTENT_CHARSET, "utf-8");
String data = getMethod.getResponseBodyAsString();
System.out.println(data);
document = DocumentHelper.parseText(data);
RSSFeedReader r = new RSSFeedReader();
System.out.print(r.getPubDate(document));
//rssfeedreader
private String getPubDate(Document document) throws Exception {
if (document == null) {
return null;
}
// 取更新时间
Element element = (Element) document
.selectSingleNode("//channel/pubDate");
if (element == null) {
return null;
}
String txt_element = element.getTextTrim();
String pubDate = DateUtil.str2strUsedByRss(txt_element);
return pubDate;
}
- 测试RSS
- RSS 测试
- 测试RSS
- 测试RSS
- PPC RSS 测试
- 继续测试RSS
- rss删除测试1
- RSS收录测试
- Rss中转测试
- 测试RSS订阅,稍后删除
- rss不更新的问题测试
- RSS
- RSS
- rss
- RSS
- RSS
- RSS
- rss
- MSSQL2005通過维护计划进行数据库备份
- 和用户一起经营的网站运营模式
- 风雨百合,梦中的格桑梅朵
- Spring Bean生命周期
- Myeclipse 注册码 sourcecode--可用到2012年
- RSS 测试
- DAL是通过代码生成工具自动生成的XSD强类型dataset怎么样把DAL和BLL都独立成项目。
- NOKIA各机型相对应操作系统平台及屏幕参数http://www.nokiacn.net/thread-213829-1-1.html
- Cannot forward after response has been committed
- 七、NHibernate关系之——一对多
- 中文排序
- struts2.0中struts.xml配置文件详解
- white paper ____ sun cloud(1)
- 编程实现一元二次方程的解 ax^2+bx+c=0