Write your own RSS

zhaozj2021-02-11  147

I saw the short message from the 9CBS system today. I use RSS to subscribe to each category. I checked the information. I found that there is a RSSLIBJ's open source tool to help us write your own RSS document. Of course, I am talking about Java. . First download a rsslibj package: http://sourceforge.net/project/showfiles.php? Group_id = 71153 Reference official website example import com.rslibj.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 /", "http://localhost/foo.jpg"); Channel.SetTextInput ("http: // localhost / Search "," Search The Channel Image "," The Channel Image "," Http:// Localhost / Item1 "," The First Item Covers Details on The First Item> "," THE First Item ") .SetdcContributor (" Joseph B. Ottinger "); Channel.AddItem (" http: // localh OST / ITEM2 "," The Second Item Covers Details On The Second Item "," The Second Item ") .Setdccreat (" jason bell "); system.out.println (" The feed in rdf: " Channel.GetFeed "RDF")));}} Starting to suspecting Chinese will have problems (old software), testing is actually very good, what is wrong. 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-5762.html

New Post(0)