Atom格式 简介

来源:互联网 发布:什么是玛丽苏剧情 知乎 编辑:程序博客网 时间:2024/05/28 16:04

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>






3 0