[COLOR=Navy]Ok I’ve got a prob here
I have this code to parse an XML doc in a webpage: –[COLOR=DarkRed]
[CODE]
<html>
<head>
<script>
function importXML()
{
if (document.implementation && document.implementation.createDocument)
{
xmlDoc = document.implementation.createDocument(“”, “”, null);
xmlDoc.onload = createTable;
}
else if (window.ActiveXObject)
{
xmlDoc = new ActiveXObject(“Microsoft.XMLDOM”);
xmlDoc.onreadystatechange = function () {
if (xmlDoc.readyState == 4) createTable()
};
}
else
{
alert(‘Your browser can’t handle this script’);
return;
}
[B]xmlDoc.load(“del.xml”);[/B]
}
function createTable()
{
var x = xmlDoc.getElementsByTagName(’emperor’);
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);
}
</script>
<body onload=”importXML()”>
<div id=”writeroot”>
</div>
</body>
</html>
[/COLOR]The problem is that i want “del.xml” to be a php file on my server if I set del.xml to another file sxtension e.g. txt or php it wont get the file in FireFox help PPPPPLLLEEEEAAAAAASSSSSSSEEEE!!!!!!
[/COLOR]