xml feed vs xml document parsing -- the difference?
When parsing XML like below, does book.xml need to be a static file of xml or can I use a dynamic feed url of RSS? Does a feed URL need to end in XML or can it simply be the URL (like: http://feeds.voices.washingtonpost.com/wp/reliable-source/index)?
if (window.XMLHttpRequest)
{
xhttp=new XMLHttpRequest();
}
else // IE 5/6
开发者_如何学C {
xhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xhttp.open("GET","books.xml",false);
xhttp.send();
xmlDoc=xhttp.responseXML;
The URL does not have to end in ".xml". Any URL will do.
精彩评论