[eluser]cayasso[/eluser]
Hi all, I need your guys help, here is the issue:
I was adding the RSS Feed functionality to my code but I keep getting this error
Quote:XML Parsing Error: syntax error
Location: http://localhost/ci/index.php/feed/index/noticias
Line Number 1, Column 37:<?xml version="1.0" encoding="utf-8"; ?>
------------------------------------^
It seems that php is adding an semicolon to the code, ...encoding="utf-8";... and this is weird, this extra semicolon seems to be cousin all the issue. I am not sure why this is doing this but I cannot get it to work, I have tried everything but no luck!
Here is my rss.php view code
Code:
<?php header("Content-Type: text/xml");
echo '<?xml version="1.0" encoding="utf-8"?>' . " ";
?>
<rss version="2.0"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:admin="http://webns.net/mvcb/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>My title</title>
<link>this should be the link</link>
<description>My Description</description>
<dc:language>en</dc:language>
<dc:creator>I am the creator </dc:creator>
<dc:rights>My Copyright </dc:rights>
<admin:generatorAgent rdf:resource="http://www.codeigniter.com/" />
<item>
<title>TITULO</title>
<link>http://www.hola.com</link>
<guid>http://www.hola.com</guid>
<description>
<![CDATA[
MY TEXT HERE
]]>
</description>
<pubDate>Tue, 06 Nov 2007 01:57:02 GMT</pubDate>
</item>
</channel></rss>
and this is how I call it in my feed.js controller
Code:
<?php
class Feed extends Controller
{
function Feed()
{
parent::Controller();
$this->load->helper('xml');
}
function index()
{
$feed = $this->load->view('feed/rss', '', TRUE);
$this->output->set_output($feed);
}
}
?>
I hope one of you EXPERTS!!! can help me with this, :down:
Thanks in advance!!