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 'https://api.rss2json.com/v1/api.json?rss_url=URL To Convert'. 
  1. // Code Sample  
  2. $(document).ready(function() {  
  3.     var url = 'http://www.recruiter.com/feed/career.xml'; //Data in XML format  
  4.     $.ajax({  
  5.         type: 'GET',  
  6.         url: "https://api.rss2json.com/v1/api.json?rss_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. });  
jQuery  
 
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.