PHP: function to get only argument. function write node & their values
<p>I want to write a function ReadXml($xmlstr) which accepts an XML string as its only argument. function should write the names of the nodes and their values.</p>

<p>For Example :</p>

<p><code>ReadXml($xmlstr)</code> where</p>

<pre><code>$xmlstr= '&lt;Address&gt;&lt;to&gt;James&lt;/to&gt;&lt;from&gt;Jani&lt;/from&gt;&lt;heading&gt;Reminder&lt;/heading&gt;&lt;body&gt;Please check your mail.&lt;/body&gt;&lt;/Address&gt;'
</code></pre>

<p>should return</p>

<pre><code>Address
to: James
from: Jani
heading: Reminder
body: Please check your mail.
</code></pre>
