I had to processed SVG images as XML documents, and I found several gotcha’s when dealing with them.
Secondly, SVG is a namespaced XML dialect. As a consequence, all the XML dialects used in your SVG documents must be bound to their namespaces, otherwise DTDs validation will fail.
Thirdly, make sure you get the units right.
px are different. Some units can be omitted others cannot. Read this
for more details of how to use units in SVG documents correctly.
CDATA section can be used to escape some characters, like
&, that are forbidden in XML elements.
CDATA means character data, which indicates
only characters data is within the section to XML parser, and will be ignored by XML parser. That is why
CDATA is often used to enclose scripts, like
“Style” information can also be embedded within a XML/SVG document by including
<style> tag in
CDATA section. However, enclosing style within
is less needed since CSS styles have less need for
& characters. Therefore you can remove
CDATA marker for CSS styles if you want.