Java Mailing List Archive

http://www.junlu.com/

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

Re: [jdom-interest] A way to map an XML file to a JAVA object?

Mattias Jiderhamn

2006-07-06

Replies:

There are lots of solutions to this. Look in the
archives of this list to find several examples.
Personally I use Castor mostly.


At 2006-07-06 11:03, S?ren Faltz wrote:
>Is there any ways to map the xml file into a
>java object??? So that i dont have to browse
>through the entire tree in order to get what i want??
>
>for instance this xml file
>
><root>
>  <name>
>    <Firstname>Soren</Firstname>
>    <Lastname>Faltz</Lastname>
>   </name>
></root>
>
>
>mapped into this
>
>MyObject obj = JDOM.Document.DOSOMETHINGHERE();
>
>println(obj.Firstname);
>println(obj.Lastname );



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