users@jaxb.java.net

RE: Re: xsi:nil

From: Vallamshettla, Anand <Anand.Vallamshettla_at_tgslc.org>
Date: Tue, 15 Feb 2005 11:33:39 -0600

In case of xsi:nil="true", returning a "Nil" Object would be better.

I am not sure how to write this kind of global customization. Any help
would be very much appreciated.

Thanks,
Anand.

-----Original Message-----
From: Kohsuke Kawaguchi [mailto:Kohsuke.Kawaguchi_at_Sun.COM]
Sent: Monday, February 14, 2005 7:56 PM
To: users_at_jaxb.dev.java.net
Subject: Re: xsi:nil

Vallamshettla, Anand wrote:
> JAXB seems to set a property value to 'null' in the following cases
>
>
>
> 1) <element xsi:nil="true"></element> is in XML doc.
>
> 2) <elemtent> tag is not in the XML doc.
>
>
>
> Is there a way in JAXB 1.0 to differentiate those 2 cases? (May be
some
> customization???)

I think this should work in 2.0 by using the JAXBElement class, but not
sure for 1.0.

You might try enabling the type substitution support, which changes the
binding somewhat, and it might allow you to do so.



-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net