[jdom-interest] Re: unwanted namespace attributes

Fabrizio Lippolis fabrizio.lippolis at aurigainformatica.it
Tue Oct 17 07:31:30 PDT 2006


Edelson, Justin ha scritto:

>> Should I set something to avoid it?
> You could call element.setNamespace(Namespace.NO_NAMESPACE)

Justin,

this way the namespace is removed at all and I get <CBIHdrBdyInv> 
instead of <BODY:CBIHdrBdyInv>. I don't want to remove the namespace, I 
just want to remove the attribute which was added by XMLOutputter. I 
know I can manually remove the attribute but as I wrote the same thing 
happened to some sons of <BODY:CBIHdrBdyInv>. This means I should 
explore the whole tree under <BODY:CBIHdrBdyInv> and remove the 
attributes. Since there was no attribute in the original namespace and I 
found it in the output of XMLOutputter I thought I could set some 
property somewhere to avoid getting the attribute on all the tags where 
I get them. It is extremely important for me to obtain _exactly_ the 
same tree I have read as input.

Best regards,
Fabrizio

P.S.: please don't reply on top because it makes difficult to follow the 
conversation.



More information about the jdom-interest mailing list