Consume RSS Feed Data Using jQuery AJAX

Steps to consume RSS data using Jquery AJAX
Here, we have used open source XML which has been exposed and can be used in our code to consume the XML data and later, converted to JSON format which can be played around with based on our requirement.
For converting to JSON format, we have used default api ' To Convert'. 
  1. // Code Sample  
  2. $(document).ready(function() {  
  3.     var url = ''; //Data in XML format  
  4.     $.ajax({  
  5.         type: 'GET',  
  6.         url: "" + url, //For converting default format to JSON format  
  7.         dataType: 'jsonp'//for making cross domain call  
  8.         success: function(data) {  
  9.             alert('Success');  
  10.             $("#rss-default").append(data.feed);  
  11.             console.log(data.feed.description);  
  12.         }  
  13.     });  
  14. });  
As we can see in the image, we are getting the XML data and later on converting it in JSON format which can be used based on our requirement.

Build smarter apps with Machine Learning, Bots, Cognitive Services - Start free.

Start Learning Now