• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

generate xml to java Bean

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?

 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try the Apache Commons Digester library.
 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you can try http://xstream.codehaus.org/ which converts objects to xml and xml to objects
 
reply
    Bookmark Topic Watch Topic
  • New Topic