Hi Kabal,
your mapping should look something like:
<mapping>
<class name="some.package.Root">
<field name="Id" type="java.lang.String">
<bind-xml name="id" node="element" />
</field>
<field name="Name" type="java.lang.String">
<bind-xml name="name" location="composite" node="element"
/>
</field>
</class>
</mapping>
Regards
Ralf
kabal schrieb:
not 100% how to describe this, so I will just show what I need to do
basically I want to map in the element "name" contained in element
"composite", into the class, without having to create another staging
object.
Changing the xml structure is not an option.
I looked into possibly using a GeneralizedFieldHandler like I did for some
date mapping, but it didnt seem appropriate.
///////////////////////
<root>
<id>1</id>
<composite>
<name>blah</name>
<description>thedescription</description>
</composite>
</root>
//////////////////////////////
public class Root {
String id;
String name;
}
///////////////////////////
<mapping>
<class name="some.package.Root">
<field name="Id" type="java.lang.String">
<bind-xml name="id" node="element" />
</field>
<field name="Name" type="java.lang.String">
??????????????????????
</field>
</class>
</mapping>
--
Syscon Ingenieurbüro für Meß- und Datentechnik GmbH
Ralf Joachim
Raiffeisenstraße 11
72127 Kusterdingen
Germany
Tel. +49 7071 3690 52
Mobil: +49 173 9630135
Fax +49 7071 3690 98
Internet: www.syscon.eu
E-Mail: [email protected]
Sitz der Gesellschaft: D-72127 Kusterdingen
Registereintrag: Amtsgericht Stuttgart, HRB 382295
Geschäftsleitung: Jens Joachim, Ralf Joachim
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email