SVG для строки JavaScript

 var stringData = document.getElementById('my-svg').outerHTML;
Fancy Flatworm