Can you attach complete sample source and result documents? Even if the root node declares the namespace properly, it's possible that intervening levels of the hierarchy change it.
-----Original Message----- From: Minimol M [mailto:[EMAIL PROTECTED] Sent: Friday, September 28, 2007 6:36 AM To: [email protected] Subject: Namespace definitions also appearing with the node when using importNode. Hi, I used the following code to import a node (along with child nodes) from a document to another DOMElement* tempNode = (DOMElement*)doc->importNode(messageHandler->currentNode, true); currentNode = currentNode->appendChild(tempNode); (currentNode is DOMNode*). But when I saw the result, the namespace definitions also are appearing in the node and its child nodes. these definitions are already there in the root node of destination document. source node to be imported ---------------------------------------- <jobBody> <requestType>activateConnection</requestType> <jobType>provide</jobType> <connectionType>BB IPStream</connectionType> <pSIService> <S97:serviceId>VLAN BB MJ AGG</S97:serviceId> <S97:serviceName>TestVLAN_BB</S97:serviceName> <S97:serviceDescription>00034</S97:serviceDescription> </pSIService> after import, the node in the destination document look like this: ------------------------------------------------------------------------ --------------------- <jobBody xmlns=" http://itprogrammes.intra.xxx.com/pdb/capabilities/ManageDaaliResource/2 005/11/16 "> <requestType>activateConnection</requestType> <jobType>provide</jobType> <connectionType>BB IPStream</connectionType> <pSIService> <S97:serviceId xmlns:S97=" http://ccm.intra.xxx.com/2005/11/16/LIB/Info/CCM/AnalysisModel/Services" >VLAN<http://ccm.intra.xxx.com/2005/11/16/LIB/Info/CCM/AnalysisModel/Ser vices%22%3EVLAN>BB MJ AGG</S97:serviceId> <S97:serviceName xmlns:S97="http://ccm.intra.xxx.com/2005/11/16/LIB/Info/CCM/AnalysisMode l/Services">TestVLAN_BB</S97:serviceName <http://ccm.intra.xxx.com/2005/11/16/LIB/Info/CCM/AnalysisModel/Services %22%3ETestVLAN_BB%3C/S97:serviceName> > <S97:serviceDescription xmlns:S97="http://ccm.intra.xxx.com/2005/11/16/LIB/Info/CCM/AnalysisMode l/Services">00034</S97:serviceDescription <http://ccm.intra.xxx.com/2005/11/16/LIB/Info/CCM/AnalysisModel/Services %22%3E00034%3C/S97:serviceDescription> > </pSIService> How can I suppress these namespace definitions so that I get the desired output? Appreciate if anybody can give a quick info. Thanks and Regards Mini.
