Thanks Kohsuke...it worked.
- Thanks
Jagdeep Singh (CONJPS)
BRO-100-1 x55574
Email: conjps_at_capgroup.com
Kohsuke Kawaguchi
<Kohsuke.Kawaguch
i_at_Sun.COM> To
users_at_jaxb.dev.java.net
04/29/2005 10:12 cc
AM
Subject
Re: Do not marshal empty
Please respond to elements...
users_at_jaxb.dev.ja
va.net
Jagdeep_Singh_at_capgroup.com wrote:
> Sorry about being too short in the beginning.....
>
> I am building content editor web app using JAXB. So on one of the page
> showing up to the user having fields corresponding to each elements in
> schema. Now if user does not enter value in one of the field. I don't
want
> to marshall empty field back to xml. So for example if page has
>
> foo input field and user does not fill that up .... than i don't want
> <foo/> in underline xml file.
>
> The reason is the other search functionality in my app searching these
> content xmls for some schema elements based on criteria.
In 1.0, I think you either set null, or you can also tell XJC to
generate isSet/unset methods by using a customization (I think it's
<jaxb:globalBindings>), then you can use the unset method.
--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi_at_sun.com