這是我第一次使用RSS,但我對XML/XSL流利。我有一個RSS Feed,我從Sharepoint的列表中提取。示例XML如下。
RSS描述元素自動解析Sharepoint列表中的各個列(Body,Expires,Attachments)。我知道從列表中我可以控制哪些字段包含在描述中,但這不是我所期望的。作爲元素的Sharepoint RSS提要描述字段
有什麼辦法強制字段來通過XML元素格式,而不是轉換爲HTML的CDATA?例如,我可能想要檢查一個優先級字段,如果它在應用XSL時很重要,我會大膽地將它變成紅色。由於這是HTML/CDATA格式,因此解析該字段很麻煩。
<rss version="2.0">
<channel>
<title>Announcements</title>
<link>http://somewebsite/Announcements/Current.aspx</link>
<description>RSS feed for the Announcements list.</description>
<lastBuildDate>Thu, 13 Aug 2009 17:31:01 GMT</lastBuildDate>
<generator>Windows SharePoint Services V3 RSS Generator</generator>
<ttl>1</ttl>
<image>
<title>Announcements</title>
<url>/_layouts/images/homepage.gif</url>
<link>http://somewebsite/Announcements/Current.aspx</link>
</image>
<item>
<title>Woohoo a post! </title>
<link>http://somewebsite/Announcements/DispForm.aspx?ID=36</link>
<description>
<![CDATA[<div><b>Body:</b> <div>
<div>The attached email was sent from chairman and CEO on Tuesday March 3, 2009.</div>
<div></div></div></div>
<div><b>Expires:</b> 7/30/2009</div>
<div><b>Attachments:</b> <a href="http://somewebsite/Woohoo.htm">http://somewebsite/Woohoo.htm</a><br><a href=""></a></div>
]]>
</description>
<author>Me, Myself and I</author>
<pubDate>Thu, 16 Jul 2009 18:38:32 GMT</pubDate>
<guid isPermaLink="true">http://somewebsite/Announcements/DispForm.aspx?ID=69</guid>
</item>
</channel>
</rss>
哇,沒有想法?真? – Jay 2009-08-17 14:57:57