Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jul 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    PHP Generated RSS Feed

    Hello,

    I wrote a script in PHP that queries my news database and builds an RSS feed from it. Unfortunately, the RSS feed is invalid, according to Mozilla Thunderbird. My RSS feed is as follows:

    Code:
    <?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel>
    		<title>Mountain View Player's</title>
    		<link>http://www.mountainviewplayers.com/rss/rss.xml</link>
    		<description>The latest news from Mountain View High School's Drama Department</description>
    		<copyright>(c) 2007, Mountain View Players. All rights reserved.</copyright><item><title>First Official News</title><description>This is the first actual piece of news in the Mountain View Players news archive and it is this: the RSS building code is done. The news reader code is done. Next to be added is a way to view ALL of the news</description><link>http://www.mountainviewplayers.com/index.php</link><pubdate>2007-07-14</pubdate></item><item><title>Test heading 2</title><description>test body 2 test body 2 test body 2 test body 2 test body 2 test body 2 </description><link>http://www.mountainviewplayers.com/index.php</link><pubdate>2007-07-10</pubdate></item><item><title>Test heading 2</title><description>test body 2 test body 2 test body 2 test body 2 test body 2 test body 2 </description><link>http://www.mountainviewplayers.com/index.php</link><pubdate>2007-07-10</pubdate></item><item><title>Test heading 2</title><description>test body 2 test body 2 test body 2 test body 2 test body 2 test body 2 </description><link>http://www.mountainviewplayers.com/index.php</link><pubdate>2007-07-10</pubdate></item><item><title>Test heading 2</title><description>test body 2 test body 2 test body 2 test body 2 test body 2 test body 2 </description><link>http://www.mountainviewplayers.com/index.php</link><pubdate>2007-07-10</pubdate></item><item><title>Test heading 2</title><description>test body 2 test body 2 test body 2 test body 2 test body 2 test body 2 </description><link>http://www.mountainviewplayers.com/index.php</link><pubdate>2007-07-10</pubdate></item><item><title>Test heading 2</title><description>test body 2 test body 2 test body 2 test body 2 test body 2 test body 2 </description><link>http://www.mountainviewplayers.com/index.php</link><pubdate>2007-07-10</pubdate></item><item><title>Test heading 2</title><description>test body 2 test body 2 test body 2 test body 2 test body 2 test body 2 </description><link>http://www.mountainviewplayers.com/index.php</link><pubdate>2007-07-10</pubdate></item><item><title>Test heading 2</title><description>test body 2 test body 2 test body 2 test body 2 test body 2 test body 2 </description><link>http://www.mountainviewplayers.com/index.php</link><pubdate>2007-07-10</pubdate></item><item><title>Test heading 2</title><description>test body 2 test body 2 test body 2 test body 2 test body 2 test body 2 </description><link>http://www.mountainviewplayers.com/index.php</link><pubdate>2007-07-10</pubdate></item><item><title>Test heading 2</title><description>test body 2 test body 2 test body 2 test body 2 test body 2 test body 2 </description><link>http://www.mountainviewplayers.com/index.php</link><pubdate>2007-07-10</pubdate></item></channel></rss>

    ...And here is the pretty version:


    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <rss version="2.0">
    	<channel>
    		<title>Mountain View Player's</title>
    		<link>http://www.mountainviewplayers.com/rss/rss.xml</link>
    		<description>The latest news from Mountain View High School's Drama Department</description>
    		<copyright>(c) 2007, Mountain View Players. All rights reserved.</copyright>
    			<item>
    				<title>First Official News</title>
    				<description>This is the first actual piece of news in the Mountain View Players news archive and it is this: the RSS building code is done. The news reader code is done. Next to be added is a way to view ALL of the news</description>
    				<link>http://www.mountainviewplayers.com/index.php</link>
    				<pubdate>2007-07-14</pubdate>
    			</item>
    			
    			<item>
    				<title>Test heading 2</title>
    				<description>test body 2 test body 2 test body 2 test body 2 test body 2 test body 2 </description>
    				<link>http://www.mountainviewplayers.com/index.php</link>
    				<pubdate>2007-07-10</pubdate>
    			</item>
    			
    			<item>
    				<title>Test heading 2</title>
    				<description>test body 2 test body 2 test body 2 test body 2 test body 2 test body 2 </description>
    				<link>http://www.mountainviewplayers.com/index.php</link>
    				<pubdate>2007-07-10</pubdate>
    			</item>
    			
    			<item>
    				<title>Test heading 2</title>
    				<description>test body 2 test body 2 test body 2 test body 2 test body 2 test body 2 </description>
    				<link>http://www.mountainviewplayers.com/index.php</link>
    				<pubdate>2007-07-10</pubdate>
    			</item>
    			
    			<item>
    				<title>Test heading 2</title>
    				<description>test body 2 test body 2 test body 2 test body 2 test body 2 test body 2 </description>
    				<link>http://www.mountainviewplayers.com/index.php</link>
    				<pubdate>2007-07-10</pubdate>
    			</item>
    			
    			<item>
    				<title>Test heading 2</title>
    				<description>test body 2 test body 2 test body 2 test body 2 test body 2 test body 2 </description>
    				<link>http://www.mountainviewplayers.com/index.php</link>
    				<pubdate>2007-07-10</pubdate>
    			</item>
    			
    			<item>
    				<title>Test heading 2</title>
    				<description>test body 2 test body 2 test body 2 test body 2 test body 2 test body 2 </description>
    				<link>http://www.mountainviewplayers.com/index.php</link>
    				<pubdate>2007-07-10</pubdate>
    			</item>
    			
    			<item>
    				<title>Test heading 2</title>
    				<description>test body 2 test body 2 test body 2 test body 2 test body 2 test body 2 </description>
    				<link>http://www.mountainviewplayers.com/index.php</link>
    				<pubdate>2007-07-10</pubdate>
    			</item>
    			
    			<item>
    				<title>Test heading 2</title>
    				<description>test body 2 test body 2 test body 2 test body 2 test body 2 test body 2 </description>
    				<link>http://www.mountainviewplayers.com/index.php</link>
    				<pubdate>2007-07-10</pubdate>
    			</item>
    			
    			<item>
    				<title>Test heading 2</title>
    				<description>test body 2 test body 2 test body 2 test body 2 test body 2 test body 2 </description>
    				<link>http://www.mountainviewplayers.com/index.php</link>
    				<pubdate>2007-07-10</pubdate>
    			</item>
    			
    			<item>
    				<title>Test heading 2</title>
    				<description>test body 2 test body 2 test body 2 test body 2 test body 2 test body 2 </description>
    				<link>http://www.mountainviewplayers.com/index.php</link>
    				<pubdate>2007-07-10</pubdate>
    			</item>
    	</channel>
    </rss>

    Any ideas on what is the problem?

  • #2
    Senior Coder NancyJ's Avatar
    Join Date
    Feb 2005
    Location
    Bradford, UK
    Posts
    3,172
    Thanks
    19
    Thanked 65 Times in 64 Posts
    Does the validator say why it isnt valid?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •