You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Stuart McMahon <sm...@zandar.com> on 2003/05/29 17:49:07 UTC

Copying an Element......

Can someone tell me how to efficiently copy an element from one svg document
to another.
After I parse the new document and find the required element I attempt to
append it to the current document, but I get a
DOMException:
"The given node (type: 1, name: defs) was not created by the current
document."

I'm trying to copy the <defs> from one file to another.

thanks,
Stuart.


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


RE: Copying an Element......

Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "SM" == Stuart McMahon <sm...@zandar.com> writes:

SM> Can someone tell me how to efficiently copy an element from one
SM> svg document to another.  After I parse the new document and find
SM> the required element I attempt to append it to the current
SM> document, but I get a DOMException: "The given node (type: 1,
SM> name: defs) was not created by the current document."

SM> I'm trying to copy the <defs> from one file to another.

    Element newDefs = (Element)newDoc.importNode(defsElem, true);

SM> thanks, Stuart.


SM> ---------------------------------------------------------------------
SM> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org For
SM> additional commands, e-mail: batik-users-help@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org