$.ajax({ url: 'xml/data.xml', type: 'GET', async: true, cache: false, dataType:"xml", error: function() { try { var xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async = true; xmlDoc.onreadystatechange = function() { successFunc(xmlDoc); } xmlDoc.load('data.xml'); } catch(e) { alert("xml load error"); } }, success: function successFunc(xml){ } });