Push SVG String into Dom?

Posted by Colin on Stack Overflow See other posts from Stack Overflow or by Colin
Published on 2010-06-15T07:35:22Z Indexed on 2010/06/16 5:52 UTC
Read the original article Hit count: 162

Filed under:
|

I have a javascript variable that basically looks like this:

my_svg_image = '<circle cx="227.58331298828125" cy="102" r="3" style="fill:black;stroke-width:0" />';

It was loaded from my database. Is there a way I can parse that string and add it to the DOM with Javascript? I have svgweb set up, but don't see how I can get it to parse this string. Are there other libraries that might help?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about svg