tags:

views:

66

answers:

1

I am trying to parse a XML using SimplePie. SimplePie wouldn't even recognize this as RSS if I didn't turn set force_feed to TRUE. The error message shown by SimplePie:

This XML document is invalid, likely due to invalid characters. XML error: Not well-formed (invalid token) at line 1, column 1

The first 2 lines of the XML document is :

<?xml version="1.0" encoding="ISO-8859-1"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">

Any idea what goes wrong here?

Edit ( update with code ):

$feed_stomp = new SimplePie();
$feed_stomp->set_feed_url('http://singaporeseen.stomp.com.sg/site/servlet/rss?view=rss&amp;vertical=contentbean%3a3552');
$feed_stomp->force_feed(true);
$feed_stomp->init();
$feed_stomp->handle_content_type();
echo $feed_stomp->error();
+1  A: 

You probably left a BOM in the string.
Please show us your code.

SLaks
Thanks, I have updated the question with codes
SteD