I am trying to parse xml file which is created by using php as shown below.But when I am trying to parse it's data using reponseXML.documentElement i am getting this error in my console "Uncaught TypeError: Cannot read property 'documentElement' of null" here is my code.I am trying to parse xml file which is created