You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Jonathan Halterman <jh...@gmail.com> on 2006/11/14 07:34:38 UTC

[betwixt] How to change a bean name before writing it out

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