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&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&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’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;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’s president, Hosni Mubarak, said that the military’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="both" style="clear: both;"/>
<br clear="both" style="clear: both;"/>
<a href="http://ads.pheedo.com/click.phdo?p=1"><img alt="" style="border: 0;" border="0" src="http://ads.pheedo.com/img.phdo?p=1"/></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’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;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’s outskirts. Egypt’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="both" style="clear: both;"/>
<br clear="both" style="clear: both;"/>
<a href="http://ads.pheedo.com/click.phdo?p=1"><img alt="" style="border: 0;" border="0" src="http://ads.pheedo.com/img.phdo?p=1"/></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’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;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’s president, Hosni Mubarak, said that the military’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="both" style="clear: both;"/>
<br clear="both" style="clear: both;"/>
<a href="http://ads.pheedo.com/click.phdo?p=1"><img alt="" style="border: 0;" border="0" src="http://ads.pheedo.com/img.phdo?p=1"/></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’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;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’s outskirts. Egypt’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="both" style="clear: both;"/>
<br clear="both" style="clear: both;"/>
<a href="http://ads.pheedo.com/click.phdo?p=1"><img alt="" style="border: 0;" border="0" src="http://ads.pheedo.com/img.phdo?p=1"/></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>