GeeCON Prague 2014*
The moose likes Other Open Source Projects and the fly likes After removing an xml node i have a whitespace in my doc Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "After removing an xml node i have a whitespace in my doc" Watch "After removing an xml node i have a whitespace in my doc" New topic
Author

After removing an xml node i have a whitespace in my doc

Christopher Whu
Ranch Hand

Joined: Sep 03, 2008
Posts: 80


if i want to delet the last node, the xml looks like



Please let me know what i am doing wrong... ty
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19697
    
  20

You could try using a Format in your XMLOutputter constructor. Format.getPrettyFormat() is my favorite.

Since this is about JDOM, can somebody move this to Other Open Source Projects?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
GeeCON Prague 2014
 
subject: After removing an xml node i have a whitespace in my doc