1

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 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.