Need remote XML doc load that works with Netscape

C

Chuck Wyatt

I've got the following code below that relies upon an ActiveX object
and a xmlDoc.load() function that works great in Internet Explorer.
I'm interested in using XML in order to load a data structure from a
remote location, and this code does it, but of course does not work in
Netscape. Is there a method of loading a remote XML doc that works in
the latest versions of NS?

Thanks,

Chuck

~~~~~~~~~ Code Example Below ~~~~~~~~

<script type="text/javascript"
for="window" event="onload">

var xmlDoc=new ActiveXObject("Microsoft.XMLDOM")
xmlDoc.async="false"
xmlDoc.load("http://www.blahblahblah.com/xml/xml_note.xml")

nodes=xmlDoc.documentElement.childNodes
to.innerText= nodes.item(0).text
from.innerText= nodes.item(1).text
header.innerText=nodes.item(2).text
body.innerText= nodes.item(3).text
</script>

<title>HTML using XML data</title>
</head>
<body bgcolor="yellow">

<h1>Blahblahblah.com Internal Note</h1>

<b>To: </b>
<span id="to"> </span>
<br />
<b>From: </b>
<span id="from"></span>
<hr>
<b><span id="header"></span></b>
<hr>
<span id="body"></span>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top