XML Data Binding with Castor
Subject:   conditional bind xml attribute
Date:   2007-04-10 08:52:42
From:   techijr
Hi, I have my XML like this

<phone type="work">123456</phone>
<phone type="cell">45624</phone>

And because of my other design limitations, I have my bean like this (and not possible to change this)

Class ContactDetails{
String cellPhone;
String workPhone;

How should my mapping.xml to parse this? Adding a condition while binding the XML. Appreciate any suggestions..