Home :: Tutorials :: SVG :: Miscellaneous

As with all XML documents, an SVG file has a single root element. In the case of SVG documents, the root is the <svg> element.

The following code uses the SVG Document to locate the outermost svg element.

svgRoot = svgDocument.documentElement;