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
Related Q & A:
- How to parse JSON from String?Best solution by Stack Overflow
- Android: How to parse JSON file with Gson Library?Best solution by Stack Overflow
- How to convert xml to json in c#?Best solution by Stack Overflow
- how to parse a xml file using jquery and phonegap?Best solution by Stack Overflow
- How to use angular.js with strongly typed view in asp.net-MVC?Best solution by ojdevelops.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
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.