开发者

SimplePie XML document invalid

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开发者_Go百科.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&vertical=contentbean%3a3552');
$feed_stomp->force_feed(true);
$feed_stomp->init();
$feed_stomp->handle_content_type();
echo $feed_stomp->error();


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜