Hi Carine Surprisingly, I had exactly the same problem yesterday.
I solved id remplacing node=parseXML(svg); by node=parseXML(svg).firstChild; And you do not need "doc.importNode(doc2,true);" line It should work well. It sounds like Mozilla ParseXML create a XML document containing the object you want to parse Hope it helps. Jérôme carine kouejou a écrit : >i try to do this operation, i use firefox natif svg: > >That is the code svg i try to execute: > ><?xml version="1.0" ?> ><svg id="root" xmlns="http://www.w3.org/2000/svg" >width="200" height="200" > > ><script><![CDATA[ > function charge(evt){ > alert("charge"); > svg=evt.target.ownerDocument; > svgRoot=svg.getElementById("root"); > node=parseXML(svg); > svgRoot.appendChild(node); > } > function parseXML (doc) { > doc2=(new DOMParser()).parseFromString("<rect >x='100' y='100' width='50' > height='50' fill='green' />","text/xml"); > doc.importNode(doc2,true); > return doc2; > > } >]]> ></script> ><rect x="10" y="10" width="50" height="50" fill="red" >onclick="charge(evt)"/> ></svg> > >I have all time that Error: uncaught exception: >[Exception... "Node cannot be >inserted at the specified point in the hierarchy" >code: "3" nsresult: >"0x80530003 (NS_ERROR_DOM_HIERARCHY_REQUEST_ERR)" >location: >"file:///C:/Documents%20and%20Settings/alkante/Bureau/Essai.svg >Line: 10"]. > >Please cant you help me. > >how can i use the function parseXML for appendChild >the node >thanks > >Carine TCHOKOTE KOUEJOU > >19 rue du nivernais >35000 Rennes > >Tél: 0033627066238 > > > > > > >___________________________________________________________________________ >Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger >Téléchargez cette version sur http://fr.messenger.yahoo.com > >[Non-text portions of this message have been removed] > > > >----- >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 > > > > > > > > -- ----------------------------- Jérôme TRICAND DE LA GOUTTE Logatique 01 46 21 59 59 50 rue Marcel Dassault 92100 Boulogne-Billancourt ----- 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/

