<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4522.1800" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>What about a factory method in org.jdom.Element
that creates an element and sets its</FONT></DIV>
<DIV><FONT face=Arial size=2>text all in one go.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>public static Element createElement(String
name,String text)</FONT></DIV>
<DIV><FONT face=Arial size=2> {</FONT></DIV>
<DIV><FONT face=Arial size=2> Element e=new Element(name);</FONT></DIV>
<DIV><FONT face=Arial size=2> e.setText(text);</FONT></DIV>
<DIV><FONT face=Arial size=2> return e;</FONT></DIV>
<DIV><FONT face=Arial size=2> }</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Then, one could replace code that looks like the
following:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Element e=new
Element("somename").setText("somevalue");</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>with</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Element
e=Element.createElement("somename","somevalue");</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Basically just as a convenience method for
programmers that need to create a lot of</FONT></DIV>
<DIV><FONT face=Arial size=2>elements with text but no attributes.</DIV>
<DIV><BR></DIV>
<DIV>Comments?</DIV>
<DIV>-Mike Jennings<BR></FONT></DIV></BODY></HTML>