Edit in JSFiddle

var container = document.body.appendChild(
    document.createElementNS('http://www.w3.org/2000/svg',
        'svg'));

var circle = container.appendChild(
    document.createElementNS('http://www.w3.org/2000/svg',
        'circle'));
    
circle.setAttribute('r', 10);
circle.setAttribute('cx', 50);
circle.setAttribute('cy', 10);