Write your own RSS

xiaoxiao2021-03-06  86

Using RSS Subscribe to each category latest document

I checked the information and found that there is a RSSLIBJ's open source tool to help us write your own RSS document.

Of course, I am talking about here is the implementation of Java.

First download a bag of RSSLIBJ:

http://sourceforge.net/project/showfiles.php?group_id=71153

Refer to the example of the official website

Import com.rslibj.efficient.channel;

Public class writer {

Public static void main (string [] args)

Throws InstantiationException, ClassNotFoundException,

IllegaCCESSEXCEPTION {

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"));

}

}

I started to suspect the Chinese will have a problem (the software outside), I have tested it very well, and there is no problem.

If you are familiar with the RSS document format, you can easily write a standard RSS Writer.

Reference: RSSLIBJ's homepage http://enigmastation.com/rsslibj/

转载请注明原文地址:https://www.9cbs.com/read-104788.html

New Post(0)