Source du fichier SVG

<svg width="400" height="200" onload="cree_texte(evt)">
<script><![CDATA[
function cree_texte(evt)
{svgdoc=evt.getTarget().getOwnerDocument();
node=svgdoc.createElement("text");
node.setAttribute("x","50");node.setAttribute("y","50");
node.setAttribute("style","text-anchor:middle;font-size:25;font-family:Arial;fill:red");
texte=svgdoc.createTextNode("tra la la");
node.appendChild(texte);
ou=svgdoc.getElementById("affiche");
ou.appendChild(node)}
]]></script>
<g id="affiche">
</g>
</svg>