Atom格式 简介
本文地址:http://blog.csdn.net/caroline_wendy/article/details/21957241
The name Atom applies to a pair of related Web standards.
Atom应用于一对相关的网络标准.
The Atom Syndication Format is an XML language used for web Feeds,
Atom供稿格式是一种XML语言,用于网页订阅源,
while the Atom Publishing Protocol (AtomPub or APP) is a simple HTTP-based protocol for creating and updating web resources.
而且Atom发布协议(AtomPub or APP)是一种简单的基于HTTP协议,用于更新网站资源.
Web Feeds allow software programs to check for updates published on a website.
在网站上,网页订阅源允许软件程序检查更新发布.
To provide a web Feed,a site owner may use specialized software (such as a content management system) that publishes a list (or "Feed") of recent articles or content in a standardized,machine-readable format.
为了提供一个网页源,在一个标准的机器可读的格式内,一个网站拥有者可能使用指定的软件(例如一个内容管理系统),用于发布一个子最近内容或条款的列表(订阅源).
The Feed can then be downloaded by programs that use it,like websites that syndicate content from the Feed,
or by Feed reader programs that allow Internet users to subscribe to Feeds and view their content.
或者被读者程序下载,允许Internet用户订阅Feeds和查看它们的内容.
注:
USGS(United States Geological Survey,美国地质勘探局)网站,使用的Feeds的格式,由xml变成atom,解析(parse)Atom格式,类似XML.
地址:http://earthquake.usgs.gov/earthquakes/Feed/v1.0/atom.PHP
类似格式:
<Feed xmlns="http://www.w3.org/2005/Atom" xmlns:geoRSS="http://www.geoRSS.org/geoRSS"> <title>USGS Magnitude 1.0+ Earthquakes,Past Hour</title> <updated>2014-03-24T07:15:02Z</updated> <author> <name>U.S. Geological Survey</name> <uri>http://earthquake.usgs.gov/</uri> </author> <id> http://earthquake.usgs.gov/earthquakes/Feed/v1.0/summary/1.0_hour.atom </id> <link rel="self" href="http://earthquake.usgs.gov/earthquakes/Feed/v1.0/summary/1.0_hour.atom"/> <icon>http://earthquake.usgs.gov/favicon.ico</icon> <entry> <id>urn:earthquake-usgs-gov:ak:11196992</id> <title>M 1.3 - 89km WNW of Cantwell,Alaska</title> <updated>2014-03-24T07:10:18.463Z</updated> <link rel="alternate" type="text/html" href="http://earthquake.usgs.gov/earthquakes/eventpage/ak11196992"/> <summary type="html"> <![CDATA[ <dl><dt>Time</dt><dd>2014-03-24 07:05:11 UTC</dd><dd>2014-03-23 23:05:11 -08:00 at epicenter</dd><dt>Location</dt><dd>63.595°N 150.696°W</dd><dt>Depth</dt><dd>14.20 km (8.82 mi)</dd></dl> ]]> </summary> <geoRSS:point>63.595 -150.6957</geoRSS:point> <geoRSS:elev>-14200</geoRSS:elev> <category label="Age" term="Past Hour"/> <category label="Magnitude" term="Magnitude 1"/> </entry> </Feed>