Any example on how to parse/have access to simple RSS feed elements in JS? I don't want to use any Microsoft specific objects.
1 Answer
If you have XML in a string, you can parse it using the following in Firefox:
var xmlStr = "<test>Hello world</test>";
var parser = new DOMParser();
var xmlDoc = parser.parseFromString(xmlStr, "text/xml");
alert(xmlDoc.documentElement.nodeName);
If you've got your XML from an XMLHttpRequest, the responseXML property of the request will be a reference to an XML document.