这是我第一次使用RSS,但我精通XML/XSL。我有一个RSS提要,我正在从Sharepoint的列表中提取它。下面是示例XML。
RSS description元素自动解析Sharepoint列表中的各个列(Body、Expires、Attachments)。我知道从列表中我可以控制哪些字段包含在描述中,但这不是我想要做的。
有没有办法强制字段以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>