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

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -