2

Is it possible to filter an RSS feed? What I mean is this, this is a sample of my RSS feed. As you can see, I have a category tag. Now, is it possible to filter by <category>?

Right now, the filtering functionality is done in code. Is there a better way to do it organically in RSS feeds itself?

<?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&amp;width=620&amp;crop=True" />
            </item>


    </channel>
</rss>
bastelflp
  • 9,362
  • 7
  • 32
  • 67
doglin
  • 1,651
  • 4
  • 28
  • 38

1 Answers1

2

No, you can't do it in the "feed" itself. The feed is just a "format". You have to use some kind of code (be it XSLT transformation, a parser or... ) to discard the content which is of no interest to you.

Julien Genestoux
  • 31,046
  • 20
  • 66
  • 93
  • You could also consider providing more than one feed on the server. For example, WordPress provides an overall RSS feed with information for all categories, and also individual RSS feeds per category, and clients can subscribe to whichever they want. But as Julien says, RSS is just a format; you'd need either server side or client side code to do something different with it. – Matt Gibson Sep 29 '15 at 07:44