// this is for MS-IE users only!
if(navigator.userAgent.indexOf("MSIE") != -1) {
var xmldoc = null;
try {
xmldoc = new ActiveXObject("Msxml2.DOMDocument.4.0");
} catch(e) {
xmldoc = null;
}
// MS-
XML-4 is available
if(xmldoc) {
xmldoc.async = false;
xmldoc.validateOnParse = false;
xmldoc.resolveExternals = true;
xmldoc.setProperty("SelectionNamespaces",
"xmlns:ns='http://my.netscape.com/rdf/simple/0.9/'");
// get this document's right table
var rTable = null;
var td = document.getElementsByTagName("td");
for(var i=0;i<td.length;i++) {
if(td[i].getAttribute("className")=="RightBar") {
rTable = td[i];
}
}
if(rTable) {
rTable.insertAdjacentHTML("beforeEnd",
"
</p>" +
"<table border=\"0\" class=\"Navigation\"" +
" id=\"insert_rdf_feed\" style=\"display:none;\">" +
"<tr><th>Aktuelle Beiträge in der
DP</th></tr>" +
"</table>");
var xmldoc_loaded = false;
try {
xmldoc.load("http://www.delphipraxis.net/rdf");
xmldoc_loaded = (xmldoc.parseError.errorCode==0);
} catch(e) {
xmldoc_loaded = false;
}
if(xmldoc_loaded) {
var table = document.getElementById("insert_rdf_feed");
var items = xmldoc.selectNodes("//ns:item");
var len = (items.length>10)?10:items.length;
for(var i=0;i<len;i++) {
var title = items[i].selectSingleNode("ns:title");
var link = items[i].selectSingleNode("ns:link");
if(table && title && link) {
var tr = table.insertRow(i+1);
if(tr) {
var td = tr.insertCell(0);
if(td) {
td.innerHTML =
"<a href=\"" +
link.text +
"\" target=\"_blank\">" +
title.text + "</a>";
}
}
td = null;
tr = null;
}
link = null;
title = null;
}
if(table) table.style.display = "";
}
rTable = null;
}
}
}