Table of Contents

Class SvgNamespaces

Namespace
Egami.Svg
Assembly
Egami.Svg.dll

The XML namespaces SVG files use.

public static class SvgNamespaces
Inheritance
SvgNamespaces
Inherited Members

Examples

SvgDocument document = SvgDocument.Parse(Icon);

// Elements, attributes and text are an editable tree, like XDocument's.
SvgElement body = document.FindById("body")!;
body.Attributes["fill"] = "#c33";
body.Attributes.Set("href", "#other", SvgNamespaces.XLink, "xlink");

SvgElement dot = new("circle");
dot.Attributes["cx"] = "12";
dot.Attributes["cy"] = "12";
dot.Attributes["r"] = "3";
document.Root.Children.Add(dot);
document.Root.Children.Add(new SvgComment(" added in code "));

foreach (SvgElement element in document.Root.Elements())
{
    Console.WriteLine($"{element.Name}: {element.Attributes.Count} attributes");
}

Fields

Svg

The SVG namespace, http://www.w3.org/2000/svg.

public const string Svg = "http://www.w3.org/2000/svg"

Field Value

string

The XLink namespace of SVG 1.1's xlink:href, http://www.w3.org/1999/xlink.

public const string XLink = "http://www.w3.org/1999/xlink"

Field Value

string

Xml

The XML namespace of xml:space and xml:lang, http://www.w3.org/XML/1998/namespace.

public const string Xml = "http://www.w3.org/XML/1998/namespace"

Field Value

string

Xmlns

The namespace of xmlns declarations, http://www.w3.org/2000/xmlns/.

public const string Xmlns = "http://www.w3.org/2000/xmlns/"

Field Value

string