[XML-SIG] Newbie question -> adding a node from an external file

Fred L. Drake, Jr. fdrake@acm.org
Fri, 28 Mar 2003 14:44:19 -0500


Ramiro Alba Queipo writes:
 > I would like to use the addChild method to inserting a node from another
 > document but it trigers an error when I try it. Can anyone give me some
 > insight about how to perform this?

I'm just guessing that you're using the DOM and mean the appendChild()
method.  If not, you'll need to be specific about what youre doing.

If the nodes are from different documents, it's entirely reasonable to
get an exception: the DOM is specified to do so.  Some DOM
implementations are more permissive than others, but you really should
be expecting an exception if more than one document is involved.

Since you didn't tell us what exception you got, though, I can't tell
if that's what's happening.  You also didn't mention which DOM
implementation you're using.

If you need more help, you're going to need to tell us more about what
you're doing and what behaviour you're actually seeing.


  -Fred

-- 
Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Zope Corporation