我新的Ajax和XML與jQuery解析和我與它一點點問題。我不想從這裏的非本地xml文件檢索數據:http://www.velib.paris.fr/service/carto/carto.xml。 在阿賈克斯,我這個編碼。使用jQuery的Ajax處理XML文件
$.ajax({
type: 'GET' ,
url: 'http://www.velib.paris.fr/service/carto/carto.xml' ,
success: function(xml) {
console.log('Success') ;
console.log(xml) ;
} ,
error: function() {
console.log('Error') ;
}
}) ;
但是,在「執行console.log(XML)在它返回的HTML標記的字符串的是,它明確XML(通過擴展,並且當u去頁面我提到上面)。也許我做錯了什麼,所以我需要幫助,請:) :)
控制檯日誌仍然返回「Object {responseText:」對於J ... rator「/>