I have something like the following unchangeable pojo:

class Element {
  private String Interface = "interfacedefinition";
  private String InterfaceVersion "v.1.2";
...
...
...
}

and i want map this class to the following xml document:

...
<Element>
   <Interface id="v.1.2">interfacedefinition</Interface>
</Element>

my first approach doesn´t have the id attribute, so i created a mapping file
with following content:

<class name="foo.pojo.Element">                
                <map-to xml="Element"/>      
                    <field name="interface"
                                        type="java.lang.String">
                                <bind-xml name="Interface" 
                                                  node="element"/>
                        </field>
</class>

How can I add the id attribute of an Element comfortly to the existing
mapping? Do I really need to add an Element Class to make this mapping
possible, or can i directly add in the definition of the id attribute to the
mapping of the "Element" class?

Thank you for help...

grz 
René
  
-- 
View this message in context: 
http://www.nabble.com/map-a-field-as-an-element-and-add-an-id-to-that-element-tf3238479.html#a9001303
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