As the comment states, it's _extremely difficult within the bridge to
implement importNode(), so it's not supported.

You should do all of your modifications with the Xerces APIs using the
Xerces DOM.  Then, when you're done, wrap the document in a
XercesDocumentBridge instance and do the transformation.  If you're going
to do modifications and transformations iteratively, make sure you destroy
the old bridge and create a new one before you transform.  The bridge is
not really designed for modification, so it's best to avoid it.

Dave



                                                                                       
                            
                    "Zubair                                                            
                            
                    Mohammed"             To:     [EMAIL PROTECTED]             
                            
                    <mohdzubair@ho        cc:     (bcc: David N Bertoni/CAM/Lotus)     
                            
                    tmail.com>            Subject:     Problem with importNode         
                            
                                                                                       
                            
                    06/25/2001                                                         
                            
                    02:52 PM                                                           
                            
                    Please respond                                                     
                            
                    to xalan-dev                                                       
                            
                                                                                       
                            
                                                                                       
                            



Hi,
I am trying to use the importNode functionality in XalanDocument.

I have the following scenario.

XalanElement*  payloadNode=0;
XalanNode* node;

payloadNode = theDoc->getDocumentElement();//theDoc is a XalanDocument
node = theTargetDoc->importNode(payloadNode,true);// theTargetDoc is the
main XalanDoc under which the payloadNode has to be imported.

When i call this importNode method it goes to
XercesDocumentBridge.cpp and throws an exception

/////////////////
XalanNode*
XercesDocumentBridge::importNode(XalanNode*         importedNode,
                               bool                      deep)
{
// $$$ToDo: Fix this....
// The problem is that we must get the Xerces node that corresponds to the
// importedNode parameter.  We could assume that it is indeed a node from
// another XercesDocumentBridge, but I'm not sure that we should do that.

throw XercesDOMException(XercesDOMException::NO_MODIFICATION_ALLOWED_ERR);

           return 0;
}



Has anyone encountered this before.

Any  help would be appreciated.

regards,
Mohammed Zubair.
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.





Reply via email to