Feed::toXml
Return the RSS 2.0 XML
Description
public string Feed::toXml()
Returns the feed as XML text (see What is written). display() sends the same text.
Example
Controller
use Fegg\Tool\Feed;
$feed = new Feed('News', '/news/', '', '/news/feed.xml');
$feed->add(array(
'title' => 'New shop',
'link' => '/news/post_12.html',
'date' => '2026-11-15 10:00:00',
));
$xml = $feed->toXml();