[jdom-interest] XMLOutputter NPE
will.glozer at jda.com
Thu Aug 3 15:19:58 PDT 2000
I'm just starting to use JDOM, so please forgive me in advance if this is
a known issue... I looked through the more recent logs and didn't see
XMLOutputter xmlOut = new XMLOutputter();
Element e = new Element("test");
Document doc = new Document(e);
That code will throw a NullPointerException inside XMLOutputter.output
the contents of the Element is an empty string... The question I have is
or not JDOM will ever be able to distinguish between empty,
Element content and null, String == null, content.
I was able to do this with W3C DOM, so I'd like to see it in JDOM. Perhaps
consider doing "<tag />" as null content and "<tag></tag>" as empty content?
More information about the jdom-interest