[jdom-interest] Reinitialisation

Bradley S. Huffman hip at cs.okstate.edu
Fri Aug 20 07:22:31 PDT 2004


Sounds like either a) the element your removing has 1 or 2 Text node
siblings that also need to be removed, or b) your using XMLOutputter
in pretty-printing mode.

Brad

"Gareth Hughes" writes:

> Hi, Could anyone tell me how to reinitialise a JDOM Document after an
> element has been removed.
> 
>  
> 
> Here's the code I'm using.
> 
>  
> 
> Parent p = element.getParent();
> 
> p.removeContent(element);
> 
>  
> 
>  
> 
> I've output the XML for visual verification that everything has worked but
> it's leaving a blank line in place of the removed element.
> 
> I'd like to reinitialise the Document so as there are no unnecessary white
> spaces.


More information about the jdom-interest mailing list