如何让ATOM阅读器(例如RSSOwl)显示ATOM提要的<content>元素?</content>

时间:2010-12-14 17:16:01

标签: xml atom-feed

如果我以错误的方式看待这个问题,请随时指出。

我正在写一本关于WCF的书。本书介绍了如何创建一个返回ATOM提要的WCF服务。

服务有效。我将浏览器指向正确的URL并获取ATOM反馈。

浏览器将数据识别为ATOM Feed,但仅显示项目的日期,而不是内容。

我使用Fiddler来检查服务正在回收的XML,每个条目都是这样的:

<entry>
<id>http://localhost:18696/Calculator/NorthwindDataService.svc/Products(1)</id>
<title type="text"></title>
<updated>2010-12-14T17:04:13Z</updated>
<author>
<name />
</author>
<link rel="edit" title="Product" href="Products(1)" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Category" type="application/atom+xml;type=entry" title="Category" href="Products(1)/Category" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Order_Details" type="application/atom+xml;type=feed" title="Order_Details" href="Products(1)/Order_Details" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier" type="application/atom+xml;type=entry" title="Supplier" href="Products(1)/Supplier" />
<category term="NorthwindModel.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<content type="application/xml">
 <m:properties>
<d:ProductID m:type="Edm.Int32">1</d:ProductID>
<d:ProductName>Chai</d:ProductName>
<d:SupplierID m:type="Edm.Int32">1</d:SupplierID>
<d:CategoryID m:type="Edm.Int32">1</d:CategoryID>
<d:QuantityPerUnit>10 boxes x 20 bags</d:QuantityPerUnit>
<d:UnitPrice m:type="Edm.Decimal">18.0000</d:UnitPrice>
<d:UnitsInStock m:type="Edm.Int16">39</d:UnitsInStock>
<d:UnitsOnOrder m:type="Edm.Int16">0</d:UnitsOnOrder>
<d:ReorderLevel m:type="Edm.Int16">10</d:ReorderLevel>
<d:Discontinued m:type="Edm.Boolean">false</d:Discontinued>
</m:properties>
</content>
</entry>

我希望ATOM阅读器能够显示元素的内容,并允许我选择要显示的列(例如ProductID,ProductName等)。

有没有办法用标准ATOM阅读器做到这一点?

或者我是否过多地询问这个申请?

ATOM读者是否只是为了显示新闻而设计的,而您自己可以获取任何自定义数据?

谢谢!

Adam Leffert http://www.leffert.com

0 个答案:

没有答案