users@jaxb.java.net

Empty tag for null value

From: <shiftane_at_gmail.com>
Date: Tue, 13 Sep 2011 14:53:59 +0000 (GMT)

Hello everybody,
i use JAXB to marshall a bean in an XML and i've a xsd to validate it.

I've one field in my bean called for example "firstname" and in the xsd
this field is in minoccurs=1. By this case, if a set firstname to null
then i've have validation error.

Y tried to modified manually the output validated and i've inserted the
tag :

<firstname/>

-- without value

and the validation pass.

So how can i create the empty tag when i've "null" in the value ?