[jdom-interest] Single space in element content

Jason Hunter jhunter at acm.org
Fri Jun 7 11:19:34 PDT 2002

> I tried both
> input.addContent( new Element("value").addContent(new Text(" ")) )
> and
> input.addContent( new Element("value").setText(" ") )
> but with the same result.

You don't really say what the "result" is.  There's many ways to view a
document.  Most likely if the space is disappearing it's because of how
you output it or how you read it in later.  What happens when you output
using a brand new untweaked XMLOutputter to System.out?


More information about the jdom-interest mailing list