[thelist] Loading XML file in IE browser

Jim A zaphod_s_cousin at hotmail.com
Wed Jun 18 12:22:11 CDT 2003

Just a shot in the dark...

What version of the MSXML parser are you using on the client? Oddly, even if 
you update IE, the parser doesn't always seem to get updated to the fully 
compatible version. Below is the link to the MSXML 3.0 SP2. This cleared up 
our problems, both on our servers and clients.


From: "Roger Ly" <evolt at matchpenalty.com>
Reply-To: "thelist at lists.evolt.org" <thelist at lists.evolt.org>
To: <thelist at lists.evolt.org>
Subject: [thelist] Loading XML file in IE browser
Date: Wed, 18 Jun 2003 09:35:33 -0700

Hey all,

I'm having a really tough time trying to debug a situation where I am
loading an external XML doc using the technique described at ppk's site

In a nutshell, I have an HTML document which tries to load an external
XML doc, and use the values in that document to help populate the DOM.

I stripped down version of the page I am using is at
http://rogerly.f2o.org/blah.html (xml is at

The area I am having trouble with is in this set of functions:

             function importXML(albumName)
                         if (document.implementation &&
                                     xmlDoc =
document.implementation.createDocument("", "", null);
                                     xmlDoc.onload = loadAlbum;
                         else if (window.ActiveXObject)
                                     xmlDoc = new
                                     xmlDoc.onreadystatechange = function
() {
                                                 if (xmlDoc.readyState ==
4) loadAlbum()
                                     alert('Your browser can\'t handle
this script');

             function loadAlbum()
                         var album =
                         if (album.length == 0)
                                     alert('it doesnt look like the xml
was loaded properly');
                         var albumChildren = album[0].childNodes;
                         for (var i = 0; i < albumChildren.length; i++)

In the loadAlbum() function, where I do the check to see if album.length
== 0, there are times where the Album node thinks that it doesn't have
any children.  What's weird is that usually, when I load the XML the
first time, everything works fine, but other times it doesn't work at
all.  When it fails, the top-level node read in from the Album.xml is
fine, but none of its children are loaded, which breaks everything for

Does anyone have any good insight in how the Microsoft.XMLDOM ActiveX
object works?  Has anyone heard of any situations where trying to load
an XML document using that object has failed for some unknown reason?
Unfortunately, I can't think of any other ways to debug the stuff except
to throw in alerts here or there in the Javascript.



* * Please support the community that supports you.  * *

Evolt.org conference in London, July 25-27 2003.  Register today at 

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !

Help STOP SPAM with the new MSN 8 and get 2 months FREE*   

More information about the thelist mailing list