It's not a secret anymore!*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 19656
    
  18

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
 
jQuery in Action, 2nd edition
 
subject: After removing an xml node i have a whitespace in my doc
 
Similar Threads
Using JDOM lib for parssing XML and writing out XML according to a DTD
Question on JDOM
need to update entry in XML file.
How to save the content withen a table into a XML file?
XML over HTTP