Re: DOMParser() and SVG
| Newsgroups | gmane.comp.mozilla.devel.svg |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <79f770cf-6cd4-49c1-959a-d41c322e7df0@x41g2000hsb.googlegroups.com> |
On 25 aug, 18:43, elliottcable <[email protected]> wrote: > There's been a short discussion of this topic back in 2006 (http://markmail.org/message/2vr63izihzb5nefr > ), regarding 1.5.0 and the then-current nightlies, but I was curious > about the current state of the matter. > > As it is, DOMParser().parseFromString(my_svg_string, "image/svg+xml") > will fail out, and replacing the SVG mime type with the plain XML mime > type will simply return a XMLDocument, which I am unable to mix into > an existing SVG node nor which can I run getElementById on. > > in other words, are there plans to support > DOMParser().parseFromString(my_svg_string, "image/svg+xml") in such a > way as to return an SVGDocument? > I have tried the same in all kinds of variations, but I can't get a working SVG presentation from a javascript-generated string. What I try to do is to generate an svg-string by javascript on an html page, then open a new window and parse the string to that window. It works if the string is saved as a file, which is then used as the url argument of window.open(), but this cannot be done in javascript. Could one of the developers please give a comment? hjcb