When I use the below code and parse the xml locally it works fine but when upload the same script at the server it shows error.
Note: I retrieved the $lng
The problem is database connection string, one of your MySQL database connection function parameter is not correct ,so there is an error message in the browser output, Just right click output webpage and view html source code you will see error line followed by correct XML output data(file). I had same problem and the above solution worked perfectly.