Hey Dan,

as far as I know there is an attribute called "container".

Have a look at the mapping.dtd:

<!ELEMENT field ( description?, sql?, bind-xml?, ldap? )>
<!ATTLIST field
    name           CDATA  #REQUIRED
    type           CDATA  #IMPLIED
...
    transient      (true|false) "false"
    identity       (true|false) "false"
    container      ( true | false ) #IMPLIED
...

I'm wondering, I couldn't find it on the website documentation.
Elements being a container are not marshalled as far as I know.

Greetings,
Lukas

[EMAIL PROTECTED] schrieb:
Hi All,

I have a class called Service with two attributes, mode and id.

Currently I am using Castor to unmarshal this xml:

<service mode="R" id="D2MAX"/>

The fields are mapped like this:

<class name="com.Service">
  <map-to xml="service"/>
  <field name="id"><bind-xml node="attribute"/></field>
  <field name="mode"><bind-xml node="attribute"/></field>
</class>

Is there any way to map the class so that the id attribute is mapped like this:

<service mode="R">D2STD</service>

Rather than like this:

<service mode="R"><id>D2STD</id></service>

Much appreciated,

Dan.



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

   http://xircles.codehaus.org/manage_email







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

   http://xircles.codehaus.org/manage_email


Reply via email to