by Jest@ on Wed Sep 05, 2007 11:46 pm
Hm. I really wouldn't advise retrogressing that far in your doctype; I'd aim for something more generally accepted and well-supported like HTML 4 or preferably XHTML transitional. Strict if you can, of course, but that's a debate for another time.
Anyway. I've never tried to do exactly what you're asking, but afaik there's no 'silver bullet' to what you want to do. For a start, loading xml from an external source can contravene some browsers security policies (the same-origin policy), which is why you've probably had a hard time with it so far. Depending on what you want the XML for,you might be able to do it with iframes *shudder* (do you just wanna display it? it'll need to be styled in some way beforehand. Do you need to access it in JS for some reason? You can do that via the iframe, but it's messy).
The easiest way I can think of is using javascript for an AJAX call (which, famously, sorta avoids established security protocol) - but I'm a JS developer, so while I think that's easy, the beginner probably shouldn't jump into that without some preparation and learning.
Another very good solution would be using server-side scripting to do the legwork for you...but again, one doesn't just become proficient in PHP, readjust the rest of your site where appropriate, and have a fully working server-side config in a day.
There is an IE-only 'technology' I know of that can do this, I think...google around for 'xml data islands'. I think I saw something in the mozilla dev-centre about a way of replicating/mimicking this in firefox, but I dunno if it's suitable.
I think the real question is..why do you need to do this in the first place?
Highlight to read:It was earth all along