kouejou schrieb:
> thank you jerome
>
> but i this solution can't solve my problem the svg element can't
> insert in my svg document.
>
> the navigator can't signal any error, but my element is not insert
> into document.
>
>
> please if you solve your problem check my program and give me the
> error your are say.
>
> thanks
>
>
> <?xml version="1.0" ?>
> <svg id="root" xmlns="http://www.w3.org/2000/svg" width="200"
> height="200" >
>
> <script><![CDATA[
> function charge(evt){
> svg=evt.target.ownerDocument;
> svgRoot=svg.getElementById("groupe");
> node=parseXML(svg).firstChild;
> add=svgRoot.appendChild(node);
>
>
> }
> function parseXML (doc) {
>
> doc2=(new DOMParser()).parseFromString("<rect
> id='elt' x='50'
> y='50' width='50' height='50' style='fill:#000000; visibility:visible'
> />","text/xml");
> return doc2;
>
> }
> ]]>
> </script>
> <g id="groupe">
> <rect x="10" y="10" width="50" height="50" fill="red"
> onclick="charge(evt)"/>
> </g>
> </svg>
>
Hi
try to add a namespace to your rect, e.g.:
doc2=(new DOMParser()).parseFromString("<rect*
xmlns='http://www.w3.org/2000/svg'* id='elt' x='50' y='50' width='50'
height='50' style='fill:#000000; visibility:visible'/>","text/xml");
cheers
Holger
-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
----
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/