users@saaj.java.net

[SAAJ-USR] RE: [Fwd: Using "removeNamespaceDeclaration()" is sometimes ignored]

From: Karr, David <David.Karr_at_wamu.net>
Date: Tue, 16 Dec 2003 12:57:18 -0800

I've been having an email conversation with some of the SAAJ developers,
but they asked me to take this question to the list, so here it is.
 
I was noticing that the output of my code using SAAJ was that namespace
declarations added to parent nodes would result in the child nodes also
having the namespace declaration. Although technically ok, I wanted to
"clean up" the resulting output, to remove the redundant namespace
declarations in the child nodes.
 
I was able to get this to work by manually using
"removeNamespaceDeclaration" on the resulting child nodes, but that
seems odd to me. After I asked about this, I was told that if I "use
the parent element to create the child", instead of using the factory,
then it will not add the namespace declaration. Now I would ask, how do
I use the parent element to create the child? I thought the SOAPFactory
was the only way to create SOAPElements.