Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70616

Parse XML to JSON in Ionic 3 using xml2js

$
0
0

@mudassarshaheen wrote:

My code is always printing error log, how can i find the exception please tell me the right way to this
Here is my code
this.http.get(‘http://www.gazetaexpress.com/rss/sport/?xml=1’).subscribe(data => {
this.xmlItems = JSON.stringify(data);
console.log(typeof(this.xmlItems));
xml2js.parseString(this.xmlItems, function (err, result) {
console.log(result);
});
}, error => {
console.log(JSON.stringify(error));
});

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70616

Trending Articles