Hi everyone,
I need to map a nested element to a Java object and I don't need to map the
parent elements. How do I define that in mapping XML? I will try to
explain my case with an example:
Suppose my XML looks like
<listing status=1>
<title>Some title</title>
<property>
<location>Some location</location>
</property>
</listing>
Suppose, I have a Java object as below
public class Property
private String location;
...
...
// getter and setter methods....
}
I only need to map 'Some Location' value to Property object's location
member variable. How do I define it in the mapping XML? How do I define
the XML hierarchical structure there?
Also, suppose I have another variable status in the class Property, which I
want to map with the 'status' attribute of element Listing, how do I do it?
I am pretty new to Castor and I am not sure if this is a very simple
question to ask. Appreciate your help.
Thanks,
Raj Goswami
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev