For some reason DOMParser is adding some additional #text elements for each newline \n
for this url
...as well as many other RSS I've tried. I checked cnn/bbc feeds, they don't have newlines and dom parser handling them nicely. So I have to add the following before parsing it
var xmlText = htmlText.replace(/\n[ ]*/g, "");
var xmlDoc = parser.parseFromString(xmlText, "text/xml");
Server is returning text/xml.
var channel = xmlDoc.documentElement.childNodes[0];
this returning \n
without my code above and channel
with correction.