Parsing XML / RSS from URL using Java Script
问题 Hi i want to parse xml/rss from a live url like http://rss.news.yahoo.com/rss/entertainment using pure Java Script(not jquery). I have googled a lot. Nothing worked for me. can any one help with a working piece of code. 回答1: (You cannot have googled a lot.) Once you have worked around the Same Origin Policy, and if the resource is served with an XML MIME type (which it is in this case, text/xml ), you can do the following: var x = new XMLHttpRequest(); x.open("GET", "http://feed.example/",