This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Customer Requirements for Developers and have Marcho Behler on-line!
See this thread for details.
The moose likes Java in General and the fly likes generate xml to java Bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "generate xml to java Bean" Watch "generate xml to java Bean" New topic
Author

generate xml to java Bean

Ori Weisler
Greenhorn

Joined: Feb 26, 2009
Posts: 10
I got this xml:

<Rows>

<Row>
<aa>6</aa>
<bb>6</bb>
<cc>10</cc>
</Row>

<Row>
<aa>11</aa>
<bb>11</bb>
<cc>9</cc>
</Row>

<Row>
<aa>5</aa>
<bb>5</bb>
<cc>8</cc>
</Row>
</Rows>

and I would like to generate it to a list of Row beans so I could iterate the values aa,bb,cc of each bean.
Does anybody know a way of doing it?

Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42956
    
  73
Try the Apache Commons Digester library.
pradeep jaladi
Ranch Hand

Joined: Nov 21, 2004
Posts: 65
you can try http://xstream.codehaus.org/ which converts objects to xml and xml to objects


Pradeep.Jaladi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: generate xml to java Bean
 
It's not a secret anymore!