I have a xml file and I want to get version and encoding number in PHP.
For example:
<?xml version="1.0" encoding="ISO-8859-1"?>
<from>John</from>
I want to get version and encoding information in PHP. (For this example 1.0 and ISO-8859-1)
How can I get it in PHP?
You can use DOMDocument to do this.