Possible to strip out everything but <item> tags in RSS?

I would like to take an RSS 2.0 feed and strip out everything in the feed with PHP besides the content in the <item></item> tags. This way I can use the information, turn into a normal XML file, and do what I want. Probably strip unnecessary white space as well. For example, here is the standard NY Times RSS:


<?xml version="1.0"?>
<?xml-stylesheet href="/css/rss20.xsl" type="text/xsl"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:nyt="http://www.nytimes.com/namespaces/rss/2.0" version="2.0" xmlns:pheedo="http://www.pheedo.com/namespace/pheedo">
    <channel>
        <title>NYT > Home Page</title>
        <link>http://www.nytimes.com/pages/index.html?partner=rss&amp;emc=rss</link>
        <description/>
        <language>en-us</language>

        <copyright>Copyright 2011  The New York Times Company</copyright>
        <lastBuildDate>Tue, 01 Feb 2011 07:17:25 GMT </lastBuildDate>
        <image>
            <title>NYT > Home Page</title>
            <url>http://graphics.nytimes.com/images/section/NytSectionHeader.gif</url>
            <link>http://www.nytimes.com/pages/index.html?partner=rss&amp;emc=rss</link>

        </image>
        <atom:link rel="hub" href="http://www.pheedo.com/api/hub/"/>
        <atom:link rel="self" href="http://feeds.nytimes.com/nyt/rss/HomePage" type="application/rss+xml"/>
        <item>
            <title>Mubarak&#x2019;s Grip on Power Is Shaken</title>
            <link>http://feeds.nytimes.com/click.phdo?i=10f2a514bde09905a21d9804a6536fe3</link>
            <pheedo:origLink>http://www.nytimes.com/2011/02/01/world/middleeast/01egypt.html?partner=rss&amp;amp;emc=rss</pheedo:origLink>

            <guid isPermaLink="false">http://www.nytimes.com/2011/02/01/world/middleeast/01egypt.html</guid>
            <media:content url="http://graphics8.nytimes.com/images/2011/02/01/world/01egypt4_span/01egypt4_span-thumbStandard.jpg" medium="image" height="75" width="75"/>
            <media:description>Protesters praying in Tahrir Square in Cairo on Monday. Some supporters of Egypt&#x2019;s president, Hosni Mubarak, said that the military&#x2019;s support for demonstrators was a blow to Mr. Mubarak.</media:description>
            <media:credit>Peter Macdiarmid/Getty Images</media:credit>
            <description>The new vice president said President Hosni Mubarak authorized him to speak with the opposition, and the army said it would not fire on protesters.<br clear=&quot;both&quot; style=&quot;clear: both;&quot;/>

<br clear=&quot;both&quot; style=&quot;clear: both;&quot;/>
<a href=&quot;http://ads.pheedo.com/click.phdo?p=1&quot;><img alt=&quot;&quot; style=&quot;border: 0;&quot; border=&quot;0&quot; src=&quot;http://ads.pheedo.com/img.phdo?p=1&quot;/></a></description>
            <dc:creator>By DAVID D. KIRKPATRICK</dc:creator>
            <pubDate>Tue, 01 Feb 2011 06:21:32 GMT</pubDate>
            <category domain="http://www.nytimes.com/namespaces/nyt_geo">Egypt</category>
            <category domain="http://www.nytimes.com/namespaces/des">Demonstrations, Protests, and Riots</category>
            <category domain="http://www.nytimes.com/namespaces/nyt_geo">Cairo (Egypt)</category>
            <category domain="http://www.nytimes.com/namespaces/nyt_per">Mubarak, Hosni</category>

            <category domain="http://www.nytimes.com/namespaces/nyt_per">ElBaradei, Mohamed</category>
        </item>
        <item>
            <title>Egypt&#x2019;s Economy Is Near Paralysis</title>
            <link>http://feeds.nytimes.com/click.phdo?i=85db33c18c7ce5dcf5e9088476561726</link>
            <pheedo:origLink>http://www.nytimes.com/2011/02/01/world/middleeast/01economy.html?partner=rss&amp;amp;emc=rss</pheedo:origLink>

            <guid isPermaLink="false">http://www.nytimes.com/2011/02/01/world/middleeast/01economy.html</guid>
            <media:content url="http://graphics8.nytimes.com/images/2011/02/01/world/EGYPT/EGYPT-thumbStandard.jpg" medium="image" height="75" width="75"/>
            <media:description>Shoppers lined up Monday at a market on Cairo&#x2019;s outskirts. Egypt&#x2019;s deteriorating economy added to pressure on the government.</media:description>
            <media:credit>Khalil Hamra/Associated Press</media:credit>
            <description>The economy approached paralysis as foreign commerce, tourism and banking all but halted.<br clear=&quot;both&quot; style=&quot;clear: both;&quot;/>

<br clear=&quot;both&quot; style=&quot;clear: both;&quot;/>
<a href=&quot;http://ads.pheedo.com/click.phdo?p=1&quot;><img alt=&quot;&quot; style=&quot;border: 0;&quot; border=&quot;0&quot; src=&quot;http://ads.pheedo.com/img.phdo?p=1&quot;/></a></description>
            <dc:creator>By NICHOLAS KULISH</dc:creator>
            <pubDate>Tue, 01 Feb 2011 06:21:33 GMT</pubDate>
            <category domain="http://www.nytimes.com/namespaces/nyt_geo">Egypt</category>
            <category domain="http://www.nytimes.com/namespaces/mdes">Economic Conditions and Trends</category>
            <category domain="http://www.nytimes.com/namespaces/nyt_per">Mubarak, Hosni</category>
            <category domain="http://www.nytimes.com/namespaces/mdes">Demonstrations, Protests, and Riots</category>

        </item>
    </channel>
</rss>

When all I really need is:


        <item>
            <title>Mubarak&#x2019;s Grip on Power Is Shaken</title>
            <link>http://feeds.nytimes.com/click.phdo?i=10f2a514bde09905a21d9804a6536fe3</link>
            <pheedo:origLink>http://www.nytimes.com/2011/02/01/world/middleeast/01egypt.html?partner=rss&amp;amp;emc=rss</pheedo:origLink>

            <guid isPermaLink="false">http://www.nytimes.com/2011/02/01/world/middleeast/01egypt.html</guid>
            <media:content url="http://graphics8.nytimes.com/images/2011/02/01/world/01egypt4_span/01egypt4_span-thumbStandard.jpg" medium="image" height="75" width="75"/>
            <media:description>Protesters praying in Tahrir Square in Cairo on Monday. Some supporters of Egypt&#x2019;s president, Hosni Mubarak, said that the military&#x2019;s support for demonstrators was a blow to Mr. Mubarak.</media:description>
            <media:credit>Peter Macdiarmid/Getty Images</media:credit>
            <description>The new vice president said President Hosni Mubarak authorized him to speak with the opposition, and the army said it would not fire on protesters.<br clear=&quot;both&quot; style=&quot;clear: both;&quot;/>

<br clear=&quot;both&quot; style=&quot;clear: both;&quot;/>
<a href=&quot;http://ads.pheedo.com/click.phdo?p=1&quot;><img alt=&quot;&quot; style=&quot;border: 0;&quot; border=&quot;0&quot; src=&quot;http://ads.pheedo.com/img.phdo?p=1&quot;/></a></description>
            <dc:creator>By DAVID D. KIRKPATRICK</dc:creator>
            <pubDate>Tue, 01 Feb 2011 06:21:32 GMT</pubDate>
            <category domain="http://www.nytimes.com/namespaces/nyt_geo">Egypt</category>
            <category domain="http://www.nytimes.com/namespaces/des">Demonstrations, Protests, and Riots</category>
            <category domain="http://www.nytimes.com/namespaces/nyt_geo">Cairo (Egypt)</category>
            <category domain="http://www.nytimes.com/namespaces/nyt_per">Mubarak, Hosni</category>

            <category domain="http://www.nytimes.com/namespaces/nyt_per">ElBaradei, Mohamed</category>
        </item>
        <item>
            <title>Egypt&#x2019;s Economy Is Near Paralysis</title>
            <link>http://feeds.nytimes.com/click.phdo?i=85db33c18c7ce5dcf5e9088476561726</link>
            <pheedo:origLink>http://www.nytimes.com/2011/02/01/world/middleeast/01economy.html?partner=rss&amp;amp;emc=rss</pheedo:origLink>

            <guid isPermaLink="false">http://www.nytimes.com/2011/02/01/world/middleeast/01economy.html</guid>
            <media:content url="http://graphics8.nytimes.com/images/2011/02/01/world/EGYPT/EGYPT-thumbStandard.jpg" medium="image" height="75" width="75"/>
            <media:description>Shoppers lined up Monday at a market on Cairo&#x2019;s outskirts. Egypt&#x2019;s deteriorating economy added to pressure on the government.</media:description>
            <media:credit>Khalil Hamra/Associated Press</media:credit>
            <description>The economy approached paralysis as foreign commerce, tourism and banking all but halted.<br clear=&quot;both&quot; style=&quot;clear: both;&quot;/>

<br clear=&quot;both&quot; style=&quot;clear: both;&quot;/>
<a href=&quot;http://ads.pheedo.com/click.phdo?p=1&quot;><img alt=&quot;&quot; style=&quot;border: 0;&quot; border=&quot;0&quot; src=&quot;http://ads.pheedo.com/img.phdo?p=1&quot;/></a></description>
            <dc:creator>By NICHOLAS KULISH</dc:creator>
            <pubDate>Tue, 01 Feb 2011 06:21:33 GMT</pubDate>
            <category domain="http://www.nytimes.com/namespaces/nyt_geo">Egypt</category>
            <category domain="http://www.nytimes.com/namespaces/mdes">Economic Conditions and Trends</category>
            <category domain="http://www.nytimes.com/namespaces/nyt_per">Mubarak, Hosni</category>
            <category domain="http://www.nytimes.com/namespaces/mdes">Demonstrations, Protests, and Riots</category>

        </item>

An easy way to do this would be to use simplexml_load_file then run through the tags until you get to item and store it within an array and then write the contents to your XML file.

I think you can use preg_match_all for this or do like SgtLegend said.

You have no idea what you talking about, right? The RSS 2.0 feed is already a Normal XML
You can already do whatever you want with it. You can use DOM parser classes of php, SimpleXML or XSLT Processor or Xpath query. Just learn to use any one of these and you can extract any data from XML.

What is it that you want to do with it anyway?