I'm trying to parse SVG from string with DOMParser. If SVG string has attribute xmlns, then element renders correctly. Otherwise browser don't render it, but element exist in DOM (it's visible in dev tools).
In this example renders only first element: https://jsfiddle.net/Severn101/jatkyvw7/
var circle1 = '<circle cx="25" cy="25" r="25" xmlns="http://www.w3.org/2000/svg" />';
var circle2 = '<circle cx="25" cy="25" r="25" />';
var svgElement = document.getElementById('svg');
var parser = new DOMParser();
var doc1 = parser.parseFromString(circle1, "image/svg+xml").documentElement;
var doc2 = parser.parseFromString(circle2, "image/svg+xml").documentElement;
svgElement.appendChild(doc1);
svgElement.appendChild(doc2);
Why is this happening and how parse svg string without mlns attribute?