1$(document).ready(function(){
2 $.ajax({
3 type: "GET" ,
4 url: "sampleXML.xml" ,
5 dataType: "xml" ,
6 success: function(xml) {
7
8 //var xmlDoc = $.parseXML( xml ); <------------------this line
9 //if single item
10 var person = $(xml).find('person').text();
11
12 //but if it's multible items then loop
13 $(xml).find('person').each(function(){
14 $("#temp").append('<li>' + $(this).text() + '</li>');
15 });
16 }
17});
18});