跨浏览器XML插入

I need to insert an XML (svg) file's contents into an html div. For browsers that don't support DOMParser() (IE7 & 8), how can I do this?

It appears that in IE8 I can insert the xml contents as text using innerHTML, but it doesn't render the svg.

My work is online at http://ec2-174-129-62-227.compute-1.amazonaws.com:8080/ but it may change a little bit as I tweak solutions. Make sure you click the "Leafy Tree" radio button. If it's functional, it should work fine in IE9 and chrome.

Maybe jQuery parseXML will serve you better?

IE8 and lower doesn't support SVG, so even if you manage to insert the elements it still won't render.

Although they won't work for my case, I did find some polyfills that will render something with SVG in older browsers. I particularly like this one by google. It uses your svg data to actually render a flash version in older internet explorer.