Hi,

You need to use importNode() and then use appendNode().

Any good book or tutorial on the DOM will explain the details.  This is 
really out of the scope of Xalan-C, so you will not find any information 
in our documentation and samples.

Dave





"Liu, Richard" <[EMAIL PROTECTED]>
12/07/2004 05:45 PM
Please respond to xalan-c-users
 
        To:     <[email protected]>
        cc:     "Liu, Richard" <[EMAIL PROTECTED]>, (bcc: David N 
Bertoni/Cambridge/IBM)
        Subject:        DOMNode AppendChild () function question

Hi,
 
   I have a XalanNode, I need to append new node to it.
 
   After I call the function "mapNode", I change it to a DOMNode, then I 
call the function appendNode ().
 
   However, I got an "XERCES_CPP_NAMESPACE::DOMException error". 
 
  When I read the description of DOMException error for function 
appendNode (), I found my error may come from the following description:
 
   WRONG_DOCUMENT_ERR: Raised if newChild was created from a different 
document than the one that created this node.
 
My new child comes from a different document, how can I append the new 
child to this document ?
 
If there are some code example, that will be very helpful.
 
 
Thanks
 
Richard Liu
Softtware Engineer at Boeing
 
 
 
 


Reply via email to