I am trying to parse this feed . If you click on this link, you will notice that it cannot even parse it correctly in the browser.
In any case, my hosting service will not allow me to use the simplexml_load_file file, so I used cURL to load it, then load the line into the DOM, for example:
$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 "is not defined in Entity"), then I tried to use SimpleXMLElement without the knowledge (it shows the same error "parser error: Entity" nbsp " not defined "etc. because of HTML in this one element).
$xml = new SimpleXMLElement($rawXML);
, : // , ?
: mjv !... ( , )
$rawXML = str_replace('<description>','<description><![CDATA[',$rawXML);
$rawXML = str_replace('</description>',']]></description>',$rawXML);