Why can not we get outerHTML of an svg element with element.outerHTML property?
element.outerHTML
Is this way is the best http://jsfiddle.net/33g8g/ for getting svg sourc
Using jQuery, you can easily create a temporary HTML wrapper around any element that doesn't support outerHTML :
function wrappedHtml(elt){ var wrapped = elt.wrap("").parent().html(); elt.unwrap(); return wrapped; }