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 - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -