I'm not sure I understand your question.  There is no "copy" constructor
for the document, just the smart pointer to the document.  For example:

void
foo(
        DOM_Document    theDoc,
        DOM_Node             theChildNode)
{
    /*
     * theLocalDoc and theDoc are smart pointers to the same DocumentImpl
instance.
     * Since theLocalDoc and theDoc refer to the same document,
theChildNode
     *  is valid with calls to made through both smart pointers.
     */
    DOM_Document    theLocalDoc(theDOC);

    /*
     * Explicitly clone the document by calling DOM_Document.cloneNode(),
asking for a deep copy.
     * theLocalClone and theDoc are smart pointers to the different
DocumentImpl instances.
     * theChildNode is a child of the original DocumentImpl.  It has no
relationship to the corresponding
     * node in the cloned document -- they are different instances.
     */
    DOM_Document    theLocalClone(theDoc.cloneNode(true));
}

Does that answer your question?

Dave



                                                                                       
                                           
                    Charlie Hart                                                       
                                           
                    <[EMAIL PROTECTED]        To:     xerces forum 
<[EMAIL PROTECTED]>                                       
                    com>                 cc:     (bcc: David N Bertoni/CAM/Lotus)      
                                           
                                         Subject:     finding given node in copy of 
DOM_Document                                  
                    04/11/2001                                                         
                                           
                    05:11 PM                                                           
                                           
                    Please                                                             
                                           
                    respond to                                                         
                                           
                    xerces-c-dev                                                       
                                           
                                                                                       
                                           
                                                                                       
                                           



I have a Dom_Document and I have a node. I create a new document with
the copy constructor. Is there any easy way to find the same node in the
new document?
thanks...charlie


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to