[jdom-interest] API suggestion
charwu at cisco.com
Thu Dec 28 12:22:54 PST 2000
But you still have to have the setText() method so that you can update the text
attribute of an existing element.. I'd rather not see so many "convenience" methods
in the core API.. why not just write your own utility class if you need it..
Just my 2 cents
----- Original Message -----
From: Mike Jennings
To: jdom-interest at jdom.org
Sent: Thursday, December 28, 2000 11:11 AM
Subject: [jdom-interest] API suggestion
What about a factory method in org.jdom.Element that creates an element and sets its
text all in one go.
public static Element createElement(String name,String text)
Element e=new Element(name);
Then, one could replace code that looks like the following:
Element e=new Element("somename").setText("somevalue");
Basically just as a convenience method for programmers that need to create a lot of
elements with text but no attributes.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the jdom-interest