If you are getting errors like “parser error : EntityRef: expecting ‘;’” when trying to parse some XML using SimpleXML, it could be because your XML file or string contains an & character. Do the following to remedy the situation:
$correct_xml = str_replace('&','&',$problem_xml);
Tags: ampersand, error, parser, parsing, PHP, SimpleXML, string