Friday, August 4th, 2006

How To Load And Parse XML Data Without ActiveX

Category: IE, Programming

In this post from Dean Edwards, he quickly shows off a feature of Internet Explorer that could replace the use of ActiveX for XML communication – XML data islands.

A little known but cool feature of Internet Explorer is it’s support for XML data islands. Basically, you can embed some XML data in a page and reference an external data source.

The method uses an XML object loaded, with the content pulled in via a .src and pushed into a XMLDocument object (versus the normal call to ActiveXObject and a .responseXML call). Unfortunately, it will only work with an XML file on a local file system, but if you have a proxy you’re using anyway (cross-domain ajax calls?) it’s a simple task.

Be sure to check out the comments for more handy tips on the subject.

Posted by Chris Cornutt at 8:12 am
5 Comments

+++--
3.6 rating from 37 votes

5 Comments »

Comments feed TrackBack URI

This method is not restricted to the local file system. It has the same restrictions as normal XHR, just without the ActiveX. You can watch the readyState property just like normal XHR.

This is probably not clear from my post. :-)

Comment by Dean Edwards — August 4, 2006

Did Ajaxian just find an old bookmarks.html file? I’m not sating that this isn’t a good solution (I am using it in Messenger Plugins a lot, as I know I have MSIE there), but hardly news.

Comment by Chris Heilmann — August 4, 2006

Chris,

Yes, it’s pretty old IE functionality.

If you’ve seen already recent Firefox 2.0 beta, you may notice that Mozilla guys reincarnated Microsoft DHTML Persistence, yet another “aged” technology (sure, not one-one, but similar enough).

VS
P.S. At the end someone will recall that Ajax is DHTML (but sounds better, I must admit ;)

Comment by Valery Silaev — August 4, 2006

Chris, in defence of Ajaxian (and tangentially myself) this is an old technology but not a very well known one. Ajax has a lot of newcomers who may not know this technique.

Comment by Dean Edwards — August 4, 2006

comment

Comment by swapna — September 18, 2007

Leave a comment

You must be logged in to post a comment.