• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

generate xml to java Bean

 
Ori Weisler
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try the Apache Commons Digester library.
 
pradeep jaladi
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can try http://xstream.codehaus.org/ which converts objects to xml and xml to objects
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic