I'm trying to download an XML document into a Netscape browser (6 or higher) but I am having trouble getting at the data.
The code I am using is similar to this...
function loadDoc(caller, url)
{
xDoc = document.implementation.createDocument("", "", null);
xDoc.onload = function() { caller.onload(xDoc, url); }
xDoc.onerror = caller.onerror;
xDoc.load(url);
}
function caller_onload(xDoc, url)
{
var nodes = xDoc.getElementsByTagName("nodes"
}
trouble is, nodes is coming back empty. If I look at xDoc itself, it's an empty document.
I have tried setting "Content-type:" to "text/xml" at the server but this seems to have no effect
can anyone help?
The code I am using is similar to this...
function loadDoc(caller, url)
{
xDoc = document.implementation.createDocument("", "", null);
xDoc.onload = function() { caller.onload(xDoc, url); }
xDoc.onerror = caller.onerror;
xDoc.load(url);
}
function caller_onload(xDoc, url)
{
var nodes = xDoc.getElementsByTagName("nodes"
}
trouble is, nodes is coming back empty. If I look at xDoc itself, it's an empty document.
I have tried setting "Content-type:" to "text/xml" at the server but this seems to have no effect
can anyone help?