Here is the example code which demonstrates how we can show the response from a XML file to the DIV tag.
Contents of MyPage.html are like below.
Notice the line in Javascript.
document.getElementById("results").innerHTML = xmlHttp.responseText;
This is doing all the magic for you.
Contents of reponse.xml
My Name | Location | Age |
---|---|---|
John | NH | 20 |
Peter | CA | 25 |
Hary | NC | 33 |
Keep both the files in the same directory on server and run it.