Display User Information from XML document

Create and save an XML document on the server, which contains 10 users information. Write a program, which takes User Id as an input and returns the user details by taking the user information from the XML document.

usersInfo.xml
<?xml version="1.0" encoding="utf-8" ?>
<usersInfo>
<user>
<userID>1</userID>
<userName>Govardhan</userName>
<occupation>AsstProfessor</occupation>
<qualification>M.Tech.</qualification>
<mailID>govardhan@gmail.com</mailID>
</user>
<user>
<userID>2</userID>
<userName>Venkatesh</userName>
<occupation>VFX Designer</occupation>
<qualification>Diploma in VFX</qualification>
<mailID>venkatesh@gmail.com</mailID>
</user>
<user>
<userID>3</userID>
<userName>Naveen</userName>
<occupation>Gold Business</occupation>
<qualification>MBA</qualification>
<mailID>naveen@gmail.com</mailID>
</user>
<user>
<userID>4</userID>
<userName>Jagadeesh</userName>
<occupation>Pencil Artist</occupation>
<qualification>Degree</qualification>
<mailID>jagadeesh@gmail.com</mailID>
</user>
<user>
<userID>5</userID>
<userName>Pavan</userName>
<occupation>Software Engineer</occupation>
<qualification>B.Tech.</qualification>
<mailID>pavan@gmail.com</mailID>
</user>
</usersInfo>

getUserInfo.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>User Details</title>
<script type="text/javascript">
function loadXML(){
var usrID = document.getUser.uid.value;
var req = new XMLHttpRequest();
req.open("GET","usersInfo.xml",true);
req.send();
var res = req.responseXML;
var u = res.getElementByTagName('usersInfo.user');
for(var i=0;i<u.length;i++){
if(u[i].getElementsByTagName('userID')[0].childNodes[0].nodeValue==usrID){
document.write("User ID : "+u[i].getElementsByTagName('userID')[0].childNodes[0].nodeValue+"<br>");
document.write("User Name : "+u[i].getElementsByTagName('userName')[0].childNodes[0].nodeValue+"<br>");
document.write("Occupation : "+u[i].getElementsByTagName('occupation')[0].childNodes[0].nodeValue+"<br>");
document.write("Qualification : "+u[i].getElementsByTagName('qualification')[0].childNodes[0].nodeValue+"<br>");
document.write("Mail-ID : "+u[i].getElementsByTagName('mailID')[0].childNodes[0].nodeValue+"<br>");
}
}
}
</script>
</head>
<body>
<form name="getUser" method="get">
<label>Enter User ID </label>
<input type="text" name="uid" placeholder="User ID" required><br><br>
<input type="button" name="retButton" value="Get User Info" onclick="loadXML()">
</form>
</body>
</html>