title: parser error : String not started expecting ' or " in php
body: <p>Hi I'm trying to convert the XML file into associative array by using the following code</p>
  
  <pre><code>$xmlUrl = '../products.xml';
  $xmlStr = file_get_contents($xmlUrl); 
  $xmlObj = simplexml_load_string($xmlStr);  print_r ($xmlObj);exit;
  $arrXml = objectsIntoArray($xmlObj);
  </code></pre>
  
  <p>and product.xml containing</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;products&gt;
    &lt;product&gt;
      &lt;sku&gt;p750h3&lt;/sku&gt;
      &lt;category&gt;Plans: Vodafone Unlimited Cap&lt;/category&gt;
      &lt;price&gt;$0&lt;/price&gt;
      &lt;totalmonthlycost&gt;$129&lt;/totalmonthlycost&gt;
      &lt;totalmincost&gt;$3096&lt;/totalmincost&gt;
      &lt;upfront&gt;$0&lt;/upfront&gt;
      &lt;imageurl&gt;http://store.vodafone.com.au/Images/Upload/nokia-6260-slide-front_118x307.png&lt;/imageurl&gt;
      &lt;threedurl&gt;http://store.vodafone.com.au/handset-nokia-6260-slide.aspx#3d&lt;/threedurl&gt;
      &lt;smallimageurl&gt;http://store.vodafone.com.au/Images/Upload/nokia-6260-slide-front_23x60.png&lt;/smallimageurl&gt;
      &lt;name&gt;Nokia 6260 Slide $129 Unlimited Cap - 24 Months&lt;/name&gt;
      &lt;description&gt;&lt;/description&gt;
      &lt;ctppage&gt;http://store.vodafone.com.au/handset-nokia-6260-slide.aspx&lt;/ctppage&gt;
      &lt;features&gt;
        &lt;![CDATA[
                  Exclusive to Vodafone, this advanced all &amp;ndash; in - one device has advanced web and navigation features plus a handy 360 degree Navi key to help you stay in control.&lt;br/&gt;&lt;ul&gt;
          &lt;li&gt;5 MP camera with Carl Zeiss optics and Flash&lt;/li&gt;
          &lt;li&gt;WiFi, HSDPA and HSUPA&lt;/li&gt;
          &lt;li&gt;Integrated GPS Navigation&lt;/li&gt;
          &lt;li&gt;3G (&lt;a href="/whatis3g-popup.aspx" onclick="window.open(this.href,'','resizable=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,width=600,height=590,status'); return false"&gt;&lt;u&gt;What's this?&lt;/u&gt;&lt;/a&gt;)&lt;/li&gt;
          &lt;/ul&gt;
              ]]&gt;
      &lt;/features&gt;
      &lt;available&gt;Yes&lt;/available&gt;
      &lt;shippingcost&gt;$0.0&lt;/shippingcost&gt;
      &lt;dimensions&gt;&lt;/dimensions&gt;
      &lt;manufacturer&gt;Nokia&lt;/manufacturer&gt;
      &lt;modelnumber&gt;6260 Slide&lt;/modelnumber&gt;
      &lt;currency&gt;AUD&lt;/currency&gt;
      &lt;devicekeypoints&gt;&amp;lt;ul&amp;gt;
  
        &amp;lt;li&amp;gt;5 MP camera with Carl Zeiss optics and Flash&amp;lt;/li&amp;gt;
        &amp;lt;li&amp;gt;WiFi, HSDPA and HSUPA&amp;lt;/li&amp;gt;
        &amp;lt;li&amp;gt;Integrated GPS Navigation&amp;lt;/li&amp;gt;
        &amp;lt;li&amp;gt;3G (&amp;lt;a href="/whatis3g-popup.aspx" onclick="window.open(this.href,'','resizable=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,width=600,height=590,status'); return false"&amp;gt;&amp;lt;u&amp;gt;What's this?&amp;lt;/u&amp;gt;&amp;lt;/a&amp;gt;)&amp;lt;/li&amp;gt;
  
        &amp;lt;/ul&amp;gt;&lt;/devicekeypoints&gt;
      &lt;deviceTagline&gt;&lt;/deviceTagline&gt;
      &lt;deviceColor&gt;Black&lt;/deviceColor&gt;
      &lt;deviceSpecialOffers&gt;&lt;/deviceSpecialOffers&gt;
      &lt;deviceMonthlyHandsetCost&gt;0.0&lt;/deviceMonthlyHandsetCost&gt;
      &lt;deviceRecommendedPlan&gt;$129 Unlimited Cap - 24 Months&lt;/deviceRecommendedPlan&gt;
      &lt;deviceOverallRating&gt;&lt;/deviceOverallRating&gt;
      &lt;plan&gt;
        &lt;term&gt;24&lt;/term&gt;
        &lt;monthlyCapCost&gt;$129&lt;/monthlyCapCost&gt;
        &lt;getMonthly&gt;
          &lt;![CDATA[Monthly credit amount - UNLIMITED&lt;br/&gt;Monthly data - 4GB&lt;sup&gt;3&lt;/sup&gt;&lt;br/&gt;Vodafone to Vodafone Calls - UNLIMITED&lt;br/&gt;Also includes - Voicemail retrieval &lt;br/&gt;&lt;br/&gt;Flexi credit amount - NA&lt;br/&gt;Standard national voice calls - UNLIMITED&lt;br/&gt;Standard txt and pxt - UNLIMITED&lt;br/&gt;]]&gt;
        &lt;/getMonthly&gt;
      &lt;/plan&gt;
    &lt;/product&gt;...etc
  </code></pre>
  
  <p>but it returns a error message as follows</p>
  
  <pre><code>Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 1: parser error : String not started expecting ' or " in D:\EBU\xampp\htdocs\biglinks\include\productUpdate.php on line 24
  
  Warning: simplexml_load_string() [function.simplexml-load-string]: &lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt; in D:\EBU\xampp\htdocs\biglinks\include\productUpdate.php on line 24
  
  Warning: simplexml_load_string() [function.simplexml-load-string]: ^ in D:\EBU\xampp\htdocs\biglinks\include\productUpdate.php on line 24
  
  Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 1: parser error : Malformed declaration expecting version in D:\EBU\xampp\htdocs\biglinks\include\productUpdate.php on line 24
  
  Warning: simplexml_load_string() [function.simplexml-load-string]: &lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt; in D:\EBU\xampp\htdocs\biglinks\include\productUpdate.php on line 24
  
  Warning: simplexml_load_string() [function.simplexml-load-string]: ^ in D:\EBU\xampp\htdocs\biglinks\include\productUpdate.php on line 24......etc
  </code></pre>
  
  <p>I am trying to fix this issue whole day and searching solution over the net but i could not get . Please let me know the reason?</p>