In IE9, imported nodes do not seem to be recognized as SVG elements

I am adding several elements to an existing SVG document using the importNode () method; everything seems beautiful; can get newly added elements using getElementsByTagName [getElementById () does not work] , but the problem is that imported elements are not recognized as SVGGElements, and they are mentioned in the same way as [object Element] s. any idea guys?

+1
source share
1 answer

Elements inside the xml file must determine what namespace they are in, otherwise they will be analyzed as unknown xml elements.

, xml <svg> . , svg, xmlns="http://www.w3.org/2000/svg" , , xmlns="http://www.w3.org/1999/xlink ( xlink ).

, , , html5, , , xmlns html ( xhtml). , , root <svg> , svg , , html5 ( ). , <g> , html5.

+2

All Articles