XML and SVG

As we keep saying, SVG is written in XML, so familiarity with XML's syntax is very helpful when you want to create or edit SVG code.

Having already looked at XML code, let's take a look at some simple SVG code. Using the Jasc WebDraw program (a drawing application for SVG, which we discuss further in Chapter 10), we made the following graphic in SVG (see Figure 1-8) and exported it into a raster bitmap file for the purposes of display in this book.

Figure 1-8. triangle.svg drawn in Jasc WebDraw.

The code behind the SVG graphic is:

Example 1-2. triangle.svg
					1.  <?xml version="1.0" standalone="no"?>
2. <!DOCTYPE svg PUBLIC "-//W3C//DTD ...

Get SVG for Web Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.