Error while parsing XML doc using jquery method


#1

jqurey function :-

$.ajax({
url: ‘…/methodlist.xml’, // name of file you want to parse
dataType: “xml”, // type of file you are trying to read
success: parse, // name of the function to call upon success
error: function(){alert(“Error: Something went wrong”);}
});

i am using this function to parse the xml file , any my parsing code is written in parse() function , something like :-

function parse(document){
(document).find('path').each(function(){ var pathid =(this).attr(‘id’);
… .

         ......

}

it parse successfully in mozila , chrome browsers but raising an exeception in this case :-

Uncaught SyntaxError: Unexpected token <

at DOMEval (C:\Users\Komal\Desktop\envelop\electron\node_modules\jquery\dist\jquery.js:82)
at domManip (C:\Users\Komal\Desktop\envelop\electron\node_modules\jquery\dist\jquery.js:5788)
at jQuery.fn.init.append (C:\Users\Komal\Desktop\envelop\electron\node_modules\jquery\dist\jquery.js:5924)
at jQuery.fn.init.<anonymous> (C:\Users\Komal\Desktop\envelop\electron\node_modules\jquery\dist\jquery.js:6018)
at access (C:\Users\Komal\Desktop\envelop\electron\node_modules\jquery\dist\jquery.js:3981)
at jQuery.fn.init.html (C:\Users\Komal\Desktop\envelop\electron\node_modules\jquery\dist\jquery.js:5985)
at Object.<anonymous> (C:\Users\Komal\Desktop\envelop\electron\node_modules\jquery\dist\jquery.js:9858)
at fire (C:\Users\Komal\Desktop\envelop\electron\node_modules\jquery\dist\jquery.js:3317)
at Object.fireWith [as resolveWith] (C:\Users\Komal\Desktop\envelop\electron\node_modules\jquery\dist\jquery.js:3447)
at done (C:\Users\Komal\Desktop\envelop\electron\node_modules\jquery\dist\jquery.js:9272)

can you tell me why i am getting this error …