I use HTTP.get() to make the request and I’m trying to parse the XML into a client-side collection. Any pointers on how to do this? I’m using XML2Js and it looks like this:
Meteor.publish('episodeSearch', function() {
var self = this;
try {
var response = HTTP.get("http://www.npr.org/rss/podcast.php?id=510307");
// parse
xml2js.parseString(response, function (err, result) {
console.log(result);
});
}
catch(error) {
console.log(error);
}
});
Yup, the answer is that you’re passing the whole response object instead of its content property value, which is where the response’s content actually resides. That’s the difference in the code in the answer above!