title: how read the data from XML file using php
body: <p>I Have a XML file which have data's in it,i want to reading the XML file get values and display the values,i am trying to display RECIPIENT_NUM and TEMPLATE ,but now i able to display only the TEMPLATE but i can't able to display the RECIPIENT_NUM.below is my code can any one guide me to display the RECIPIENT_NUM,thanks</p>
  
  <p>XML</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;DOCUMENT&gt;
     &lt;VERSION&gt;2.0&lt;/VERSION&gt;
     &lt;INVOICE_NUM&gt;33&lt;/INVOICE_NUM&gt;
     &lt;PIN&gt;14567894&lt;/PIN&gt;
     &lt;MESSAGE_TYPE&gt;INSTANT_SEND&lt;/MESSAGE_TYPE&gt;
     &lt;COUNTRY_CODE&gt;xxxxxxx&lt;/COUNTRY_CODE&gt;
     &lt;TEMPLATE&gt;Dear Mrs Braem, this is a message from xxxxxxx. Kindly call us regarding your cleaning appoitnment tomorrow at 9.30. Thanks and Regards&lt;/TEMPLATE&gt;
     &lt;DATABASEINFO&gt;
        &lt;DATABASE_NAME&gt;xxxxxx&lt;/DATABASE_NAME&gt;
        &lt;CLINIC_ID&gt;1&lt;/CLINIC_ID&gt;
     &lt;/DATABASEINFO&gt;
     &lt;MESSAGES&gt;
        &lt;MESSAGE&gt;
           &lt;SEND_DATE&gt;2013-12-15&lt;/SEND_DATE&gt;
           &lt;ENTITY_ID&gt;0&lt;/ENTITY_ID&gt;
           &lt;RECIPIENT_NUM&gt;xxxxxxx&lt;/RECIPIENT_NUM&gt;
           &lt;MESSAGE_PARAMS /&gt;
        &lt;/MESSAGE&gt;
     &lt;/MESSAGES&gt;
     &lt;CSUM&gt;ffd6c84a1a89a0f2ebc8b1dc8ea1f4fb&lt;/CSUM&gt;
  &lt;/DOCUMENT&gt;
  </code></pre>
  
  <p>PHP</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  
  &lt;?php
  $xml=simplexml_load_file("/data/data/www/Message.xml");
  print_r($xml);
  
  echo $xml-&gt;TEMPLATE . "&lt;br&gt;";
  echo $xml-&gt;RECIPIENT_NUM."&lt;br&gt;";
  ?&gt;  
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>