I've been trying to parse this feed. If you click on that link, you'll notice that it can't even parse it correctly in the browser.
Anyway, my hosting service won't let me use simplexml_load_file, so I've been using cURL to get it then loading the string into the DOM, like this:
$dom = new DOMDocument;
$dom->loadXML($rawXML);
if (!$dom) {
echo 'Error while parsing the document';
exit;
}
$xml = simplexml_import_dom($dom);
But I get errors ("DOMDocument::loadXML() [domdocument.loadxml]: Entity 'nbsp' not defined in Entity"), then I tried using SimpleXMLElement without luck (it shows the same error "parser error : Entity 'nbsp' not defined", etc... because of the HTML in that one element).
$xml = new SimpleXMLElement($rawXML);
So my question is, how do I skip/ignore/remove that element so I can parse the rest of the data?
Edit: Thanks to mjv for the solution!... I just did this (for others that have the same trouble)
$rawXML = str_replace('<description>','<description><![CDATA[',$rawXML);
$rawXML = str_replace('</description>',']]></description>',$rawXML);