Hi
I am seeking some advice on how to handle the following situation.
Let's assume i have an xml like this:
<person>
<name>xxx</name>
<address>yyy</address>
<tel>
<number>111</number>
<number>222</number>
<number>333</number>
</tel>
</person>
and a JavaBean like that:
....
public class Person
{
private String name;
private String address;
private Vector number;
public String getName() {...}
public void setName(String name){...}
public String getAddress(){...}
public void setAddress(String address){...}
public Vector getNumber(){...}
public void setNumber(Vector number){...}
}
For the field name and address there isn't any problem but how can i map the
field "number" to the class Person??
I wonder if there is a way to map the field number just like this:
<?xml version="1.0"?>
<mapping>
<class name="Person">
<map-to xml="Person"/>
...
<field name="number"
type="java.lang.String" collection="vector">
<bind-xml name="tel/number" node="element"/>
</field>
...
</class>
</mapping>
Thanks for any suggestions.
Ale