Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Need remote XML doc load that works with Netscape

From: cwyatt@---.--- (----- -----)
To: NULL
Date: 7/1/2004 6:24:00 AM
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>


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent