The browser prompts me to download a file which has the same name as the action but no xml extension. When I add the xml extension and delete the white space before <?xml … the browser then reads the file as expected. How do I get Zend_Feed not doing this? Is there something I've missed?
Thanks, Jess Simone Carletti wrote: > > Be sure you set the correct MIME Response Type to application/xml. > > > Waigani wrote: >> >> Yay it works! Thank you. But now the browser does not recognise the xml. >> I'm probably missing something obvious as I'm new to feeds: >> >> <?xml version="1.0" encoding="utf-8"?> >> <rss xmlns:content="http://purl.org/rss/1.0/modules/content/" >> version="2.0"> >> <channel> >> <title><![CDATA[Test Feed]]></title> >> <link>test.com</link> >> <description><![CDATA[First test feed]]></description> >> <pubDate>Mon, 10 Dec 2007 21:28:44 +0000</pubDate> >> <managingEditor>[EMAIL PROTECTED] (Jesse Meek)</managingEditor> >> <copyright>University, all rights reserved</copyright> >> <generator>Zend Framework Zend_Feed</generator> >> <language>en</language> >> <docs>http://blogs.law.harvard.edu/tech/rss</docs> >> <item> >> <title><![CDATA[Item One]]></title> >> <link>test.com</link> >> <description><![CDATA[this is a test feed]]></description> >> <content:encoded><![CDATA[Hello, this is the >> content]]></content:encoded> >> <pubDate>Mon, 10 Dec 2007 21:28:44 +0000</pubDate> >> </item> >> </channel> >> </rss> >> >> >> >> >> Simone Carletti wrote: >>> >>> Hi Waigani, >>> >>> entries must be an array of entries and each entry is an array itself. >>> This is the right version of your code, you are missing one array >>> statement. >>> >>> //Feed Array >>> $feedArray = array( >>> 'title' => 'Test Feed', >>> 'link' => 'test.com', >>> //'lastUpdate' => (0 == $posts->count() ? date('c', >>> strtotime()) : date('c')), >>> 'charset' => 'utf-8', >>> 'description' => 'First test feed', >>> 'author' => 'Jesse', >>> 'email' => '[EMAIL PROTECTED]', >>> 'copyright' => 'University, all rights reserved', >>> 'generator' => 'Zend Framework Zend_Feed', >>> 'language' => 'en', >>> 'entries' => array( >>> array( >>> 'title' => 'Item One', >>> 'link' => 'test.com', >>> 'description' => 'this is a test feed', >>> 'lastUpdate' => strtotime($post->updated), >>> 'content' => 'Hello, this is the content', >>> ) >>> ) >>> ); >>> >>> >>> >>> >> >> > > -- View this message in context: http://www.nabble.com/%3A-exception-%27Zend_Feed_Builder_Exception%27-with-message-%27title-key-of-source-property-is-missing%27-tp14205926s16154p14282234.html Sent from the Zend Framework mailing list archive at Nabble.com.
