What is SVG Example in XML

In this article I have described about a simple graphics image in XML and defining the code.
  • 1930

Read about SVG here

View SGV Example

An example of a simple SVG graphic:

<?xml version="1.0" encoding="utf-8" ?>
     <svg xmlns="http://www.w3.org/2000/svg" version="1.1">
       <rect width="100%" height="100%"/>
       <circle cx="100" cy="50" r="40" fill="red" />


 SVG 9.jpg

SVG code Explanation:

  • The first line contains the XML declaration.
  • standalone='no' means SVG has a reference to an external file.
  • Xml define the namespace and version use the program.
  • The SVG code start <SVG> elements.
  • The <rect> element is used to draw a rectangle.
  • The <circle> element is used to draw a circle.
  • cx and cy define the circle is center.

You may also want to read these related articles :

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

© 2020 DotNetHeaven. All rights reserved.