title: PHP SimpleXML: Uncaught exception 'Exception' with message 'String could not be parsed as XML'
body: <p>I have this error when I am reading XML: </p>
  
  <pre><code>Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : Start tag expected, '&lt;' not found
  Warning: SimpleXMLElement::__construct(): feed.xml
  Warning: SimpleXMLElement::__construct(): ^
  Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in  #1 {main} thrown 
  </code></pre>
  
  <p>PHP:</p>
  
  <pre><code>$feed = new SimpleXMLElement("feed.xml");
  echo $feed-&gt;SHOPITEM[0]-&gt;ID_PRODUCT;
  </code></pre>
  
  <p>XML:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;PRODUCTS&gt;
    &lt;SHOPITEM&gt;
      &lt;ID_PRODUCT&gt;&lt;![CDATA[121110]]&gt;&lt;/ID_PRODUCT&gt;
    &lt;/SHOPITEM&gt;
    &lt;SHOPITEM&gt;
      &lt;ID_PRODUCT&gt;&lt;![CDATA[121111]]&gt;&lt;/ID_PRODUCT&gt;
    &lt;/SHOPITEM&gt;
  &lt;/PRODUCTS&gt;
  </code></pre>
  
  <p>Error is on the line where is <code>new SimpleXMLElement("feed.xml)</code> released. Where can be the problem? The XML file is valid.</p>