<HTML><FONT FACE=arial,helvetica><FONT SIZE=2 FAMILY="SANSSERIF" FACE="Arial" LANG="0">Hi,<BR>
<BR>
I'm writing a program that can help generate all the source and deployment descriptor for the EJB 2.0 CMP Beans. I'm writing the part where I need to generate the xml files. When I add children to the root, it's funny to see how the first child is aligned with the parent while all the other children has their own line. Is there a way to insert a new line after the parent, so that the first child will have its own line? Here's my source and resulting xml:<BR>
<BR>
Source:<BR>
<BR>
Element root = new Element("GREETING");<BR>
root.setText("Hello JDOM!");<BR>
<BR>
Element child = new Element("KID");<BR>
child.setText("child 1");<BR>
<BR>
Element child1 = new Element("KID1");<BR>
child1.setText("child 2");<BR>
<BR>
root.addContent(child);<BR>
root.addContent(child1);<BR>
<BR>
Document doc = new Document(root);<BR>
<BR>
<BR>
Resulting XML: <BR>
<BR>
<GREETING>Hello JDOM!<KID>child 1</KID><BR>
<KID1>child 2</KID2><BR>
</GREETING><BR>
<BR>
Please help. Thanks.<BR>
<BR>
</FONT></HTML>