今天看到系統發來的短消息
采用RSS訂閱每個類別最新文檔
我查了下資料
發現有個rsslibj的開源工具可以幫助我們寫自己的rss文檔
當然
我這裡講的是java的實現
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(//localhost/
);
channel
setTitle(
My Channel
);
channel
setImage(//localhost/
The Channel Image
);
channel
setTextInput(//localhost/search
Search The Channel Image
The Channel Image
s
);
channel
addItem(//localhost/item
The First Item covers details on the first item>
The First Item
)
setDcContributor(
Joseph B
Ottinger
);
channel
addItem(//localhost/item
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出來
From:http://tw.wingwit.com/Article/program/Java/Javascript/201311/25489.html