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>
-- 
View this message in context: 
http://www.nabble.com/marshalling-%22complex%22-element-into-%22root%22-class-tp24939960p24939960.html
Sent from the Castor - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to