wood burning stoves*
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 Murach's Java Servlets and JSP this week in the Servlets 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: 19649
    
  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
 
Don't get me started about those stupid light bulbs.
 
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