I see tag can be used within svg tag (ref). Also, the elements within svg tag is accessible through JavaScript outside the tag as they are part o
You can call an external file using the xlink:href attribute.
(source: W3C)
Also, I recommend you RaphaelJS, a JavaScript library allowing cross-browser vector drawing.