I have an object called TickeDO which contains another object TicketoptionDO. I am generating xml using Castor 1.2. the TicketoptionDO object is an optional value. how can i avoid ticketoption tag in the generated xml when it is null. right now, i am getting empty tag as </ticketoption> within the <ticket> tag. below is my mapping structure.