Need some help how to generate xml from java bean.

Hi,Can some one help me how to generate the xml format output from a java bean.The bean contains around 15 to 20 attribute values. Thanks in Advance.sarayu
[190 byte] By [Sarayu_Geethajalia] at [2007-11-26 12:36:45]
# 1
public String toXML(){//fill in here}
zadoka at 2007-7-7 16:03:25 > top of Java-index,Desktop,Developing for the Desktop...
# 2
You can use XMLEncoder with custom persistence delegates if needed: http://java.sun.com/products/jfc/tsc/articles/persistence4/
UncleSAMa at 2007-7-7 16:03:25 > top of Java-index,Desktop,Developing for the Desktop...
# 3
u can use Jax b for this
inyoa at 2007-7-7 16:03:25 > top of Java-index,Desktop,Developing for the Desktop...