[jdom-interest] getText with an empty element

Brett McLaughlin brett.mclaughlin at lutris.com
Wed Sep 20 15:33:57 PDT 2000

Kem Morehead wrote:
> I have a feeling this is a stupid question, but I need to be code-complete
> in a day so I'm really under the gun. I had jdom working fine, then I had to
> switch to the most recent source code and everything went to hell in a
> handbasket (so-to-speak).
> Here's my question: I have an empty element, which aparently means that
> content (in Element.java) is null. When I try to do getText(), instead of
> returning null, I get a null pointer exception (because content is null).
> What am I supposed to do instead? Which method is it that I need?

Nope - I just fixed this yesterday (it was a bug) so try the latest from


> I'm really sorry if the answer is obvious.
> Thanks in advance!
> -------------------------------------------------
> Kem Morehead, software engineer
> Idiom, Inc. [www.idiominc.com]
> 781.464.6113
> kmorehead at idiominc.com
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com

Brett McLaughlin, Enhydra Strategist
Lutris Technologies, Inc. 
1200 Pacific Avenue, Suite 300 
Santa Cruz, CA 95060 USA 

More information about the jdom-interest mailing list