Answer the question
In order to leave comments, you need to log in
PHP parsing Hebrew rss through simplexml or domdocument doesn't return anything, why?
Good afternoon.
I'm trying to get RSS data in the form of an array or object
The link to RSS itself is rss.mivzakim.net/rss/category/10
when I try it through simplexml it gives an error
simplexml_load_string(): Entity: line 207: parser error : Entity 'ndash' not defined
$doc = new \DOMDocument();
$doc->load($xmlstr);
$root = $doc->documentElement;
Answer the question
In order to leave comments, you need to log in
https://github.com/imangazaliev/didom - with the ability to process invalid documents
Hebrew has nothing to do with it, a problem in the processing of ndash. There are 2 options for solving the problem:
1) You can stupidly replace –
the document with a regular dash —
2) You can use any parser in pure php, for example https://github.com/revnode/xml
I was not too lazy to check that it processes your file perfectly.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question