【问题标题】:What is Atom XML? [closed]什么是 Atom XML? [关闭]
【发布时间】:2014-08-28 03:56:12
【问题描述】:
我在 .net 的 ODATA 服务中工作。我听说 ODATA 服务返回 ATOM XML 和 JSON。我不确定 ATOM XML。
谁能用一个例子解释一下 ATOM XML 是什么?
【问题讨论】:
标签:
.net
xml
odata
atom-feed
【解决方案1】:
Atom 是一种基于 XML 的文件格式,用于联合内容。作为 RSS 2.0 的替代品而开发,它位于 XML 命名空间中。 Atom 1.0 提要的一个示例是:
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Example Feed</title>
<subtitle>A subtitle.</subtitle>
<link href="http://example.org/feed/" rel="self" />
<link href="http://example.org/" />
<id>urn:uuid:60a76c80-d399-11d9-b91C-0003939e0af6</id>
<updated>2003-12-13T18:30:02Z</updated>
<entry>
<title>Atom-Powered Robots Run Amok</title>
<link href="http://example.org/2003/12/13/atom03" />
<link rel="alternate" type="text/html" href="http://example.org/2003/12/13/atom03.html"/>
<link rel="edit" href="http://example.org/2003/12/13/atom03/edit"/>
<id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
<updated>2003-12-13T18:30:02Z</updated>
<summary>Some text.</summary>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>This is the entry content.</p>
</div>
</content>
<author>
<name>John Doe</name>
<email>johndoe@example.com</email>
</author>
</entry>
来源:http://whatis.techtarget.com/definition/Atom-XML