commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Denton <maje...@gmail.com>
Subject Re: [betwixt] root Collections?
Date Sun, 20 Mar 2005 07:13:45 GMT

Yes, The goal is to have an AddressBook object.

I think I figured it out but I don't know what if three things that

I was trying to avoid having:

<addressBook>
	<personList>
		<person name=joe"/>
		<person name="frank"/>
	</personList>
</addressBook>

What I want is:

<addressBook>
	<person name=joe"/>
	<person name="frank"/>
</addressBook>


I figured it out but it was one of three things:

1) adding a removePerson(Person person) method
2) <element name="person" property="persons" />
3) the structure of my betwixt files.

Jeremy


On Mar 19, 2005, at 3:52 PM, Vikram Goyal wrote:

> I am not sure what you mean. Is addressBook a collection of Person 
> objects?
>
> java.util.ArrayList addressBook = new java.util.ArrayList();
> addressBook.add(new Person("Bob"));
> addressBook.add(new Person("John"));
> bWriter.write("addressBook", addressBook);
> bWriter.flush();
>
> This should do what you want to do, if I understand you correctly.


---------------------------------------------------------------------
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