-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjQueryXml.html
More file actions
25 lines (24 loc) · 828 Bytes
/
jQueryXml.html
File metadata and controls
25 lines (24 loc) · 828 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<html>
<head>
<script src="jquery-3.1.1.js"></script>
<script>
$(document).ready(function(){
$.ajax({
type:"GET",
url:"http://localhost:8080/JerseyUlhas/webapi/message",
datatype:"xml",
success:function(xmlData){
data="";
$(xmlData).find('messages').each(function(){
data+="ID is "+$(this).find('id').text()+" Name is "+ $(this).find('name').text()+ "<br>";
});
$("#displayData").html(data);
}
});
});
</script>
</head>
<body>
<div id="displayData"></div>
</body>
</html>