No. I'm trying to get all the person objects into an ArrayList.

Thanks
Ravi.

Eckenfellner Klaus wrote:
Does your collection-bean have adder-functions for the person-beans?

please see example at
http://commons.apache.org/betwixt/guide/examples.html (bottom of page).

Ravindra Wankar wrote:
  
How do I convert an XML to bean collection?

XML:
<persons>
   <person>
       <name>A</name>
       <age>21</age>
   </person>
   <person>
       <name>B</name>
       <age>25</age>
   </person>
   <person>
       <name>C</name>
       <age>32</age>
   </person>
</persons>

Java code:

beanReader.registerBeanClass("persons",  ArrayList.class);
beanReader.registerBeanClass("persons/person",  Person.class);
ArrayList persons = (ArrayList)beanReader.parse(xmlReader);

I get an empty list. I'm using Betwixt 0.8, Digester 1.8, BeanUtils 1.7

Thanks
- Ravi.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


    


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  

--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to