I have XML file like: myxml1.gz. As there is need it will be convert the well-formed XML document in the given file to an object: $myxml= simplexml_load_file("myxml1.gz");
How to change within one line into XML to be read as $myxml= simplexml_load_file("myxml1.xml");
Need help.
whitespace
4:31 pm on May 21, 2015 (gmt 0)
The ".gz" file extension implies it has been gzip encoded, so this needs to be decoded (perhaps with gzdecode() - PHP 5.4) first.
Although you should probably throw some error checking in the mix too.
How to change within one line into XML
Is "one line" a specific requirement? If you squash it all on one line (ie. no error checking) then you aren't necessarily going to know which bit fails in an error state. (?)