You can use the following RSS
http://www.washingtonpost.com/wp-dyn...tion/index.xml
HERE'S THE CODE:
[HTML]
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft Wordpad>
<meta name="The 36th Project" content="Miscrosoft Wordpad">
<title>36th Project project</title>
<b><font size=6 face=bold>View Articles</font></b>
<div id=ReplaceMe>Enter XML file</div><BR>
<input id=T1 type=text style="width: 400"><P>
<input type=button value="Submit Query"
onclick="ReplaceMe.innerHTML = T1.value";>
</head>
<body>
<form>
<input type=button value="CONTINUE"
ONCLICK="importXML()";>
</form>
</body>
<script LANGUAGE=JavaScript>
[/HTML]
Expand|Select|Wrap|Line Numbers
- //create an instance of the XML parser
- function importXML()
- {
- if (document.implementation && document.implementation.createDocument)
- {
- var hWin=window.open("","RSSINPUT","height=300,width=750,scrollbars=yes,toolbar=yes,location=yes,directo ries=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes");
- hWin.document.write("<HTML>\n<HEAD>\n<TITLE>XML Parse Result</TITLE>\n</HEAD>\n");
- hWin.document.write("<BO" + "DY>\n");
- hWin.document.write("<H2>I entered this URL, "http://www.washingtonpost.com/wp-dyn/rss/nation/index.xml", But This is blank?</H2>");
- xmlDoc = document.implementation.createDocument("", "", null);
- xmlDoc.onload = createTable;
- }
- else if (window.ActiveXObject)
- {
- var hWin=window.open("","RSSINPUT","height=300,width=750,scrollbars=yes,toolbar=yes,location=yes,directo ries=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes");
- hWin.document.write("<HTML>\n<HEAD>\n<TITLE>XML Parse Result</TITLE>\n</HEAD>\n");
- hWin.document.write("<BO" + "DY>\n");
- hWin.document.write("<H2>I entered this URL, "http://www.washingtonpost.com/wp-dyn/rss/nation/index.xml", But This is blank?</H2>");
- xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
- xmlDoc.async="false" //make sure doc is fully loaded
- xmlDoc.onreadystatechange = function () {
- if (xmlDoc.readyState == 4) createTable()};
- }
- else
- {
- if (xmlDoc.parseError.errorCode != 0) {
- var myError = xmlDoc.parseError;
- alert("You have error " + myError.reason);
- }
- xmlDoc.load('ReplaceMe');
- }
- function createTable()
- {
- var x = xmlDoc.getElementsBytagname("author");
- var newEl = document.createElement('TABLE');
- newEl.setAttribute('cellPadding',5);
- var tmp = document.createElement('TBODY');
- newEl.appendChild(tmp);
- var row = document.createElement('TR');
- for (j=0;j<x[0].childNodes.length;j++)
- {
- if (x[0].childNodes[j].nodeType != 1) continue;
- var container = document.createElement('TH');
- var theData = document.createTextNode(x[0].childNodes[j].nodeName);
- container.appendChild(theData);
- row.appendChild(container);
- }
- tmp.appendChild(row);
- for (i=0;i<x.length;i++)
- {
- var row = document.createElement('TR');
- for (j=0;j<x[i].childNodes.length;j++)
- {
- if (x[i].childNodes[j].nodeType != 1) continue;
- var container = document.createElement('TD');
- var theData = document.createTextNode(x[i].childNodes[j].firstChild.nodeValue);
- container.appendChild(theData);
- row.appendChild(container);
- }
- tmp.appendChild(row);
- }
- document.getElementById('writeroot').appendChild(newEl);
- }
- }
</html>