I\'m needing to load an XML document into PHP that comes from an external source. The XML does not declare it\'s encoding and contains illegal characters like &
&
To solve this issue, set the DomDocument recover property to TRUE before loading XML Document
TRUE
$dom->recover = TRUE;
Try this code:
$feedURL = '3704017_14022010_050004.xml'; $dom = new DOMDocument(); $dom->recover = TRUE; $dom->load($feedURL);