Java Implementation Web version RSS reader (iii) analysis of online RSS Subscriptions

Source: Internet
Author: User
Tags character set generator

Previous Blog "Web version RSS reader (ii)--Using the Dtree Tree load RSS Subscription group list" has been written to read the RSS subscription list, today, when you get an online RSS subscription information, how to parse it to get the article or information.

First, the RSS version. Many people say RSS, but a lot of people do not know that RSS actually more than one format. Our common subscription format is in RSS and Atom 2 formats. RSS has a version from v0.9 until now v2.0,atom the latest version is 1.0.

Developerworks an article, "Using RSS and Atom to achieve news syndication," mentions similarities and differences:

The similarities between RSS and Atom abstracts

Each summary file actually represents a channel. It contains channel headers, links, descriptions, authors, and so on. Channel Information provides basic information about the summary. The channel information is followed by some items. Each item represents a true news or article that can be read from the digest reader. Typically, each item contains a title, link, update time, and summary information.

Different points of RSS and Atom Digest

Refer to RSS 2.0 and Atom 1.0, Compared, and review the differences between RSS and Atom.

RSS and Atom have similar xml-based formats. Their basic structure is the same, and there is only one difference in the expression of the node.

In the RSS standard format:

<!--XML version and character set--> <?xml version= "1.0"?> <!--RSS version--> <rss version= "2.0" > <!--below for Channel Information and news or articles list--> <channel> <!--channel Overall information: Start--> <!--Channel title--> <title>lift off news</t
  itle> <!--Channel Link's total address--> <link>http://liftoff.msfc.nasa.gov/</link> <!--channel Description text--> Languages used by <description>liftoff to spaces exploration.</description> <!--channels (ZH-CN for Simplified Chinese)--> <languag  
  E>en-us</language> <!--Channel release time--> <pubdate>tue 2003 04:00:00 gmt</pubdate> <!--Channel Last updated--> <lastbuilddate>tue June 2003 09:41:01 gmt</lastbuilddate> <docs>http:// blogs.law.harvard.edu/tech/rss</docs> <!--Channel Builder--> <generator>weblog Editor 2.0</generator&gt  
  ; <ttl>5</ttl> <!--channel Overall information: End--> <!--each RSS news message is included in the item node,--> <item> <!--News Title--> <tiTle>star city</title> <!--news link address--> <link>http://liftoff.msfc.nasa.gov/news/2013/news-starci Ty.asp</link> <!--news content brief description--> <description>how do Americans get ready to work with Russians Aboa RD The International space station? They take a crash course in culture, language and protocol at Russia ' s Star city.</description> <!--press Release Time--> <pubdate>tue, 2003 09:39:21 gmt</pubdate> <!--news directory--> <category>it</ Category> <!--news author--> <author>bill</author> <guid>http://liftoff.msfc.nasa.gov/2003 /06/03.html#item573</guid> </item> <!--second news information--> <item> <title>space Explor Ation</title> <link>http://liftoff.msfc.nasa.gov/</link> <description>sky watchers in Euro PE, Asia, and parts of Alaska and Canada would experience a partial eclipse of the Sun on Saturday, May31st.</description> Fri, May 2003 11:06:42 gmt</pubdate> &LT;GUID&GT;HTTP://LIFTOFF.MSFC.NASA.GOV/2 003/05/30.html#item572</guid> </item> </channel> </rss>

More Wonderful content: http://www.bianceng.cn/Programming/Java/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.