Aren't they referring to the same xml element? Something like:<invoice> <header> <sup> <ID> string-you-desire </ID> </sup> </header></invoice> Why would you think that it would be applied twice? It seems that it would do exactly what you say it actually does. Kurt
From: [email protected] To: [email protected] Date: Thu, 5 Aug 2010 19:52:17 -0300 Subject: [castor-user] Castor - Trouble trying to bind same XML tag to multiple class fields 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

