Friday, August 4th, 2006
How To Load And Parse XML Data Without ActiveX
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.












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. :-)
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.
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 ;)
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