KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm trying to parse RSS feed from this link http://www.gazetaexpress.com/rss.php?cid=1,13&part=rss but when i try displaying the results it gives me the following error: Warning: DOMDocument::load() [domdocument.load]: Opening and ending tag mismatch: strong line 208 and description in http://www.gazetaexpress.com/rss.php?cid=1,13&part=rss , line: 209 in C:\wamp\www\gazetaExpress\scripts\reader.php on line 17 as well as Warning: DOMDocument::load() [domdocument.load]: Premature end of data in tag rss line 2 in http://www.gazetaexpress.com/rss.php?cid=1,13&part=rss , line: 226 in C:\wamp\www\gazetaExpress\scripts\reader.php on line 17 the script that i'm using for parsing is $xmlDoc->load($xml); $x=$xmlDoc->getElementsByTagName('item'); for ($i=0; $i<6; $i++) { $item_title=$x->item($i)->getElementsByTagName('title')->item(0)->childNodes->item(0)->nodeValue; $item_link=$x->item($i)->getElementsByTagName('link')->item(0)->childNodes->item(0)->nodeValue; $item_desc=$x->item($i)->getElementsByTagName('description')->item(0)->childNodes->item(0)->nodeValue; // and echo statements } When I try some other rss feed from this site (like sports: http://www.gazetaexpress.com/rss.php?cid=1,24&part=rss ), it works fine. It's exactly the above rss feed that won't work. Is there any way to get around this? any help would be hugely appreciated.
Tags (comma-separated)
Save Edits
Cancel