I'm not sure if this answers your question, since it is not clear what you mean by “[using] SVG is similar to HTML”, but there is a JavaScript library called Raphaël that allows you to manipulate SVG graphics in a way that is similar to using jQuery for HTML page controls. This means that you can animate images, attach event handlers, and change colors or shapes on the page. (The bonus is that Raphaël uses VML for Internet Explorer without SVG support.) Another way is to use jQuery SVG or some other library .
Of course, SVG is just XML, which is a text format, so any template engine should work with it, but the difference is in using Raphaël, jQuery SVG, etc. the fact is that they do not manipulate the source text of the basic XML format, but the resulting DOM tree, which means not only that you can see the results live while you modify the tree, but also it’s much more difficult to create invalid documents, which is quite common if You manipulate the XML source with templates that usually do not understand XML, but instead process it like any text.
I recommend reading the Illustrator for Raphael JS: A Guide and see how the Raphaël SVG Import Plug-in and Raphaël SVG Import Classic on GitHub.
source share