first_page

Songhay System Zend Sample Online

Buy this Book at Amazon.com! The content of this message is used by the SonghaySystem.com sample “Zend Framework Sample: Default Application.” The content of this message comes from an AJAX call against a server running the Zend Framework. The Zend_Feed_Rss class is used to read a WordPress news feed, containing this message—this Blog post. This feed class instantiates and object that contains one or more Zend_Feed_Entry_Rss objects.

Both the Zend_Feed_Rss class and the Zend_Feed_Entry_Rss class inherit from the Zend_Feed_Element class. The Zend_Feed_Element->saveXml() method can be used to return the raw XML of the item element in the RSS feed (conventionally stored in the PHP variable called $item).

For WordPress RSS 2.0 feeds, you should see the content:encoded element extending RSS in the ‘raw’ XML. The content of the message you are reading now is stored in this element. There are two of many ways to access this element directly from PHP. One is found in a Zend “bug” report called “Zend_Feed (RSS) Does Not Provide Access To <content:encoded>”—Kevin Golding in a comment refers to the $item-&gt;encoded() method.

The other way comes from the Zend documentation for Zend_Feed_Element->__get(). The documentation states that this method will “enable read access to content:encoded element.” An expression like $item-&gt;__get('content:encoded') should produce the expected results.

Related Resources

rasx()