Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JDOM User »

[jdom-interest] converting Elements to objects

Anton Stoyanov

2005-02-17

Replies:

Hi

i have the following (seems common, but all the posts about that are
from 2000 !)

i have an xml file like so:

<customer>
<name>john</name>
<tel>23423423</tel>
etc....
</customer>

and a Customer.java class which has

String name;
String tel;
etc....


with JDOM I can get a java.util.List of elements, but how can I
transform them into customer objects ?

I'm very interested in finding a solution which is independant of the
"customer" bit. because i have other classes too.

thanks alot
if you need more information, please tell me.


--
----------------------
Anton Stoyanov
_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@(protected)
©2008 junlu.com - Jax Systems, LLC, U.S.A.