Get Xml version
<p>I have a xml file and I want to get version and encoding number in PHP.</p>

<p>For example:</p>

<pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
&lt;from&gt;John&lt;/from&gt;
</code></pre>

<p>I want to get version and encoding information in PHP. (For this example 1.0 and ISO-8859-1)</p>

<p>How can I get it in PHP?</p>
