title: Read XML file and write to a php array/file
body: <p>I need to update the country list of my website and I want to automate the process. Country list can be found here
  <a href="http://www.iso.org/iso/country_codes...code_lists.htm" rel="nofollow">http://www.iso.org/iso/country_codes...code_lists.htm</a> // Edit : Can't find the good link...</p>
  
  <p>I tried it this way –
  <a href="http://www.w3schools.com/php/php_xml_parser_expat.asp" rel="nofollow">http://www.w3schools.com/php/php_xml_parser_expat.asp</a> (PHP XML Expat Parser)
  However, this didn't seem to work well as I was confused where to actually 'get' the data and print it to my own array for later use.</p>
  
  <p>Now I want to try it using <a href="http://www.php.net/manual/en/book.domxml.php" rel="nofollow">XML DOM</a>. </p>
  
  <p>Just want to check with everyone, if I had a simple XML file to read, that contained a country code and country name as follows:</p>
  
  <pre><code>&lt;Entry&gt; 
  &lt;Country_name&gt;AFGHANISTAN&lt;/Country_name&gt;
  &lt;Code_element&gt;AF&lt;/Code_element&gt;
  &lt;/Entry&gt;
  </code></pre>
  
  <p>I want to read this file (DOM method), and then feed the data into a separate file/array of mine that will be accessed by my website. What PHP xml functions would YOU use/recommend to do this simple task?</p>
  
  <p>Any help in this regards is appreciated.</p>