SimplePie XML belgesi geçersiz

0 Cevap php

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

XML belgesinin ilk 2 satır:

<?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">

Herhangi bir fikir burada ne yanlış gidiyor?

Düzenle (kod ile update):

$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();

0 Cevap