Hi Werner, thanks for your contact.

Would it make sense for Castor to allow it in the near future? Would it go 
against Castor's main purpose/design?

Regards,
Diego

-----Mensagem original-----
De: Werner Guttmann [mailto:[email protected]] 
Enviada em: sábado, 7 de agosto de 2010 17:56
Para: [email protected]
Cc: Diego Camargo Prates
Assunto: Re: [castor-user] Castor - Trouble trying to bind same XML tag to 
multiple class fields

Hi Diego,

that definitely is not an option with Castor XML. A binding between an 
XML artefact and a Java class/property has to be unique.

Regards
Werner Guttmann

On 06.08.2010 00:52, Diego Camargo Prates wrote:
> Hi,
>
> Is Castor capable of binding the very same tag from an XML to multiple class 
> fields through distinct mapping file entries?
>
> Please give a look at the mapping below:
>
> <field name="supplierID" type="java.lang.String">
> <bind-xml name="ID" node="element" location="invoice/header/sup" />
> </field>
>
> <field name="senderID" type="java.lang.String">
> <bind-xml name="ID" node="element" location="invoice/header/sup" />
> </field>
>
> The above mapping will populate "supplierID" only leaving "senderID" null.
>
> The expected behavior would be my object to end up with both fields filled in 
> with the same information (that is for instance defined by 
> "invoice/header/sup/ID").
>
> Any clues? Any help is appreciated.
>
> Thanks,
> Diego
>

---------------------------------------------------------------------
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