commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Halterman" <jhalter...@gmail.com>
Subject [betwixt] How to change a bean name before writing
Date Tue, 14 Nov 2006 07:20:38 GMT
Hi,

I have a List of bean objects that I can successfully write out with
betwixt using BeanWriter. I'd like to specify some custom name for my
bean objects that I am writing out, as opposed to having the root xml
element for each bean being the bean's class name. Is there a way to
do this?

Ex.

List myList = new Vector();
myList.add(new SomeBean("someData");

BeanWriter.write("beanlist, myList);

xml looks like:

<beanlist>
<SomeBean>
<attribute>someData</attribute>
</SomeBean>
</beanlist>

I would like to use a custom name for my SomeBean elements so the xml
looks like:

<beanlist>
<bean>
<attribute>someData</attribute>
</bean>
</beanlist>

Regards,

Jonathan

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message