I'm sending a cross domain request using jquery ajax. I can send the request successfully, but when I get response I get syntax error in console and XML processing error.
var xml_response="http://test.test.in:8080/RestAPI/ServiceRequestServlet?request=<xml><request><functiontype>2003</functiontype><groupzid>185</groupzid><moduleid>8</moduleid><servicetype>21</servicetype></request></xml>"
$(document).ready(function(){
  $("#dvContent").append("<ul></ul>");
  $.ajax({
    type: "GET",
    crossDomain: true,
    url: xml_response,
    dataType: 'jsonp',
    success: function(xml){
     alert("success");
  },
  error: function() {
    alert("An error occurred while processing XML file.");
  }
  });
});
I want to copy the response to a variable so that I can parse it and display it accordingly in a multiselect
 
     
    