title: parser error : XML declaration allowed only at the start of the document
body: <p>I have a xml file which contains multiple declarations like the following</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;root&gt;
   &lt;node&gt;
    &lt;element1&gt;Stefan&lt;/element1&gt;
    &lt;element2&gt;42&lt;/element2&gt;
    &lt;element3&gt;Shirt&lt;/element3&gt;
    &lt;element4&gt;3000&lt;/element4&gt;  
  &lt;/node&gt;
  &lt;/root&gt;
  
  &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;root&gt;
   &lt;node&gt;
    &lt;element1&gt;Damon&lt;/element1&gt;
    &lt;element2&gt;32&lt;/element2&gt;
    &lt;element3&gt;Jeans&lt;/element3&gt;
    &lt;element4&gt;4000&lt;/element4&gt;  
  &lt;/node&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>when i tried to load the xml with </p>
  
  <pre><code>$data = simplexml_load_file("testdoc.xml") or die("Error: Cannot create object");
  </code></pre>
  
  <p>then it gives me the following error</p>
  
  <pre><code>Warning: simplexml_load_file(): testdoc.xml:11: parser error : XML declaration allowed only at the start of the document in C:\xampp\htdocs\crea\services\testxml.php on line 3
  
  Warning: simplexml_load_file(): &lt;?xml version="1.0" encoding="UTF-8"?&gt; in C:\xampp\htdocs\crea\services\testxml.php on line 3
  
  Warning: simplexml_load_file(): ^ in C:\xampp\htdocs\crea\services\testxml.php on line 3
  
  Warning: simplexml_load_file(): testdoc.xml:12: parser error : Extra content at the end of the document in C:\xampp\htdocs\crea\services\testxml.php on line 3
  
  Warning: simplexml_load_file(): &lt;root&gt; in C:\xampp\htdocs\crea\services\testxml.php on line 3
  
  Warning: simplexml_load_file(): ^ in C:\xampp\htdocs\crea\services\testxml.php on line 3
  Error: Cannot create object
  </code></pre>
  
  <p>please let me know how to parse this xml or how to split it into no of xml files so that i can read. The file size is around 1 gb.</p>