I have a rails app and i wanna to parse the xml response from API using Javascript (ajax). I tried:
$(document).ready(function()
{
$.ajax({
type: "GET",
url: "http://localhost:3000/users/mike.xml",
dataType: "xml",
success: parseXml
});
});
function parseXml(xml)
{
...
}
but don't work. When i am changing the 'url' with a local xml file e.x url: 'data.xml', works fine!
How can i parse this response?
any help will be highly appreciated :-)