[jdom-interest] API suggestion

Jason Hunter jhunter at collab.net
Thu Dec 28 13:00:30 PST 2000


> Then, one could replace code that looks like the following:
>  
> Element e=new Element("somename").setText("somevalue");
>  
> with
>  
> Element e=Element.createElement("somename","somevalue");

But the current way is the same amt of typing, and more intuitive I
think.

I could see a proposal to make Element have a constructor with that
signature, but namespaces get in the way.  We already have a constructor
with a two-String signature, and the second parameter is a namespace
URI.

-jh-



More information about the jdom-interest mailing list