Welcome Guest, Not a member yet? Register   Sign In
RSS not displaying description

I followed Derek's way of implementing RSS. But something is wrong and I cannot see what it is.
The content inside the "description" tag doesn't show in the rss view.
Here's the controller:

class Autores_rss extends Controller  {

    function Autores_rss() {
    function index() {
        $data['encoding'] = 'utf-8';
        $data['feed_name'] = 'Autores na Página Literária do Porto';
        $data['feed_url'] = 'http://www.paginaliterariadoporto.com';
        $data['page_description'] = 'Últimos autores adicionados à Página Literária do Porto';
        $data['page_language'] = 'pt';
        $data['creator_email'] = 'Tiago Cruz - tfncruz at gmail dot com';
        $data['autores'] = $this->autores_model->get_ultimos(10);    
        header("Content-Type: application/rss+xml");
        $this->load->view('autores_rss_view', $data);

Here's the view:
<?php echo '<?xml version="1.0" encoding="utf-8"?>' . "\n"; ?>

<rss version="2.0"

    &lt;title&gt;&lt;?php echo $feed_name; ?&gt;&lt;/title&gt;
    &lt;link&gt;&lt;?php echo $feed_url; ?&gt;&lt;/link&gt;
    <description>&lt;?php echo $page_description; ?&gt;</description>
    <dc:language>&lt;?php echo $page_language; ?&gt;</dc:language>
    <dc:creator>&lt;?php echo $creator_email; ?&gt;</dc:creator>

    <dc:rights>Copyright &lt;?php echo gmdate("Y", time()); ?&gt;</dc:rights>
    <admin:generatorAgent rdf:resource="http://www.codeigniter.com/" />
    &lt;?php foreach($autores as $row): ?&gt;
        &lt;title&gt;&lt;?php echo $row->nome; ?&gt;&lt;/title&gt;
        &lt;link&gt;&lt;?php echo base_url().'index.php/autor_main/pp/'.$row->autorID; ?&gt;&lt;/link&gt;
        <description>&lt;?php xml_convert($row->excerto); ?&gt;</description>
          <pubDate>&lt;?php echo $row->dh; ?&gt;</pubDate>
    &lt;?php endforeach; ?&gt;

There's nothing wrong with the model... the get_ultimos() function returns the latest 10.
Another thing... if I substitute xml_convert($row->excerto) with echo "lalala", "lalala" appears correctly on all items...

Any ideas?

Thanks in advance!

Guess You need to echo xml_convert().

ups... you're right :S I really need a break!
Thank you very much!

[eluser]Phil Sturgeon[/eluser]
The best advice anyone can give you in programming is "learn to debug".

Lots of stuff randomly wont work in a project, just output variables and values at every level until you work out where its going wrong.

Theme © iAndrew 2016 - Forum software by © MyBB