How To Read ".XML" File Offline Using Pure JavaScript? -


i trying read .xml file feed using pure javascript in pc show data on browser. can view feed.xml file online saved googleblogxmlfeed. can read online via json want read offline after saving them in file feed.xml in pc. possiable or not? if yes guideline...???

you can not access "user" local file system web page. serious security issue (do want web apps able access files on pc while browsing?).

if have file on same server app can access it, make sure have file extension in mime-types.

----- adding code based on comments -------

$.ajax({    url: "feed.xml",     success: function(xml){       var xmldoc = $.parsexml( xml ),          $xml = $( xmldoc ),          title = $xml.find( "title" ).text();      console.log(title);    }  });


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -