<!DOCTYPE html>
<html>
<head>
<script>
var parser = new DOMParser(), conteiner = parser.parseFromString('\
<svg version="1.1" xmlns="http://www.w3.org/2000/svg">\
<g>\
<rect width="100%" height="100%" fill="red" />\
<circle cx="150" cy="100" r="80" fill="green" />\
<text x="150" y="125" font-size="60" text-anchor="middle" fill="white">SVG</text>\
</g>\
</svg>\
', 'text/xml').documentElement.firstElementChild;
document.addEventListener('DOMContentLoaded', function(){
document.getElementById('svg').appendChild(conteiner);
}, false)
</script>
</head>
<body>
<svg version="1.1" baseProfile="full" id="svg" xmlns="http://www.w3.org/2000/svg">
</svg>
<body>
</html>
https://developer.mozilla.org/en/SVG...etting_Started
https://developer.mozilla.org/en/DOMParser