javascript - How to parse xml into JSON using angular.js? -


i trying parse xml in angular.js, time consuming. there smarter , faster way available parse xml in angular.js.

you can parse xml using domparser in core javascript,but time consuming suggest use jquery xml json plugin download plugin url https://www.fyneworks.com/jquery/xml-to-json/

and use following way

var ajaxrequest = $http.get(urlforservice); ajaxrequest .success(function(data){   $scope.list = $.xml2json(data); // parsing xml response json }); 

and use list variable in template whatever way want-


Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

javascript - Blogger related post gadget image Resize s72-c [ Need Expert Help ] -