title: read xml file with php
body: <p>I have an XML file  in this format </p>
  
  <pre><code> "note.xml"
        &lt;currencies&gt;
       &lt;currency name="US dollar" code_alpha="USD" code_numeric="840" /&gt;
           &lt;currency name="Euro" code_alpha="EUR" code_numeric="978" /&gt;
  
        &lt;/currencies&gt;
  </code></pre>
  
  <p>PHP CODE</p>
  
  <pre><code>$xml=simplexml_load_file("note.xml");
  
  echo $xml-&gt;name. "&lt;br&gt;";             --no output
  echo $xml-&gt;code_alpha. "&lt;br&gt;";        --no output
  echo $xml-&gt;code_numeric . "&lt;br&gt;";        --no output
  
       print_r($xml);
  </code></pre>
  
  <p>output of print_r($xml)-->SimpleXMLElement Object ( [currency] => SimpleXMLElement Object ( [@attributes] => Array ( [name] => US dollar [code_alpha] => USD [code_numeric] => 840 ) ) </p>
  
  <p>I didnt get any output for the ECHO statements 
  I tried 'simplexml_load_file' and tried reading from it but it doesnt work. Please tell me what php code should I use to read from this format of XML file.</p>