How to modify SVG data in MSSQL database by means of XML-DML

Example

USE SVG
GO

INSERT INTO svg_Elements (ElementType, Element)
VALUES (1, '')

--  Getting attribute value
SELECT nref.value('@rx', 'nvarchar(50)')
FROM   svg_Elements CROSS APPLY Element.nodes('//ellipse') AS R(nref)

--  Updating attribute value
DECLARE @Element XML
DECLARE @ID BIGINT
SELECT TOP (1) @ID = ID , @Element = Element FROM svg_Elements

SET @Element. modify('replace value of (/ellipse/@rx)[1] with "11"' )

UPDATE svg_Elements
SET Element = @Element
WHERE ID = @ID

-- Checking
SELECT @Element
SELECT Element FROM svg_Elements

XML Data Modification Language (XML DML)

How to insert SVG into HTML

Simplest example drawing an ellipse

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> XHTML document </title>
</head>
<body>
     <svg xmlns="http://www.w3.org/2000/svg" width="300" height="200">
          <g>
               <ellipse cy="20" rx="45" ry="50" 
                        transform="translate(45,30)" />
          </g>   
     </svg>
</body>
</html>