开发者

How do I get an ATOM reader (e.g. RSSOwl) to show the <content> element of an ATOM feed?

Please feel free to point out if I am looking at this problem the wrong way.

I'm working through a book on WCF. The book shows how to create a WCF service that returns an ATOM feed.

The service works. I point a browser to the correct URL and get an ATOM feed back.

The browser recognizes the data as an ATOM feed, but only shows the dates of the items, not the contents.

I used Fiddler to examine the XML that the service is handing back, and each entry looks like this:

<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" />
开发者_StackOverflow<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>

I was hoping that the ATOM reader would display the contents of the elements, and allow me to choose which columns (e.g. ProductID, ProductName, etc.) to display.

Is there a way to do this with a standard ATOM reader?

Or am I asking too much of this application?

Are ATOM readers just designed to display news, and you're on your own for any custom data?

Thanks!

Adam Leffert http://www.leffert.com

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜