过滤 RSS 提要
Filtering a RSS feeds
是否可以过滤 RSS 提要?我的意思是,这是我的 RSS 提要示例。如您所见,我有一个 category
标签。现在,是否可以按 <category>
进行过滤?
现在,过滤功能是用代码完成的。有没有更好的方法在 RSS 提要本身中有机地做到这一点?
<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<language>en</language>
<copyright></copyright>
<category><![CDATA[Outdoor_Decor]]></category>
<item>
<title><![CDATA[It’s Linner Time! ]]></title>
<link>http://marilyn.localhost/Entertaining/segments/Daily/August2013/08_01_2013/LinnerDecor</link>
<description><![CDATA[]]></description>
<pubDate>1/1/0001 12:00:00 AM</pubDate>
<media:thumbnail url="http://marilyn.localhost/getattachment/903cf7b4-3016-4b09-b992-b54a1819a13a/RSSFeeds/Feeds1?height=349&width=620&crop=True" />
</item>
</channel>
</rss>
不,您不能在 "feed" 本身中执行此操作。提要只是 "format"。您必须使用某种代码(无论是 XSLT 转换、解析器还是...)来丢弃您不感兴趣的内容。
是否可以过滤 RSS 提要?我的意思是,这是我的 RSS 提要示例。如您所见,我有一个 category
标签。现在,是否可以按 <category>
进行过滤?
现在,过滤功能是用代码完成的。有没有更好的方法在 RSS 提要本身中有机地做到这一点?
<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<language>en</language>
<copyright></copyright>
<category><![CDATA[Outdoor_Decor]]></category>
<item>
<title><![CDATA[It’s Linner Time! ]]></title>
<link>http://marilyn.localhost/Entertaining/segments/Daily/August2013/08_01_2013/LinnerDecor</link>
<description><![CDATA[]]></description>
<pubDate>1/1/0001 12:00:00 AM</pubDate>
<media:thumbnail url="http://marilyn.localhost/getattachment/903cf7b4-3016-4b09-b992-b54a1819a13a/RSSFeeds/Feeds1?height=349&width=620&crop=True" />
</item>
</channel>
</rss>
不,您不能在 "feed" 本身中执行此操作。提要只是 "format"。您必须使用某种代码(无论是 XSLT 转换、解析器还是...)来丢弃您不感兴趣的内容。