How to parse XML using angular js?

How to parse xml into JSON using angular.js?

  • I am trying to parse XML in angular.js, but it is very time consuming. Is there any smarter and faster way available to parse XML in angular.js.

  • Answer:

    you can parse the xml using DomParser in core javascript,but it time consuming so i suggest you to use jQuery XML to JSON Plugin download plugin from url https://www.fyneworks.com/jquery/xml-to-json/ and use it following way var ajaxRequest = $http.get(UrlForService); ajaxRequest .success(function(data){ $scope.list = $.xml2json(data); // parsing xml response into Json }); and use the list variable in your template whatever way you want-

Omi at Stack Overflow Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.