Thank you, Sam, for pointing this out.
It seems that it is a matter of the schema definition.

I myself dont really like this DB-style defintion of passing null-values
through an xml. My rationale would  be "easier"
a) there is a value for the tag -- fine
b) there is no value -- leave the tag emtpy

At the moment I dont have any different solution than yours:
check the data which is to be set for null, if so, dont set it - a bit
inconvinient but correct regarding XML Schema Standard.

Best regards,
Michael

> When I asked a similiar question back on 10/25,  I received this:
>
>     ----- Original Message -----
>     From: Cezar Andrei <mailto:[EMAIL PROTECTED]>
>     To: [email protected] <mailto:[email protected]>
>     Sent: Tuesday, October 25, 2005 2:12 PM
>     Subject: RE: nilable and validate()
>
>     There is an earlier discussion on this topic, please see:
>      
>     http://www.mail-archive.com/[email protected]/msg00512.html
>      
>     Cezar
>
> which I found very helpful.  The bottom line I came up with is you
> have to test your data for null for each item that has
> *minOccurs="0".*  If it is null, then you do not want to set the
> value.  I'll be interested if you come up with a different answer.
>  
> -Sam
>  
>  
> ----- Original Message -----
> From: "Michael Wirz" < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> >
> To: < [email protected] <mailto:[email protected]> >
> Sent: Wednesday, November 23, 2005 9:27 AM
> Subject: how to suppress xsi:nil="true" attributes in xml text
>
> > Hello XML Beans Users,
> >
> > I am using xmlBeans to create xml Documents. As usual I call all the
> setters
> > of the elements and do a .xmlText(XmlOptions) or a .save(XmlOptions).
> > Wherever I had passed null to the setter methods I find a xsi:nil="true"
> > attribute, e.g. <Ort xsi:nil="true"></Ort>
> >
> > First question: Why does that happen?
> > Second question: How can I suppress this behaviour?
> > I didnt find any option in Xmloptions that looked like it was it.
> >
> > Thanks for your help,
> > Michael Wirz
> >
> > --
> > abs IT Service GmbH
> > abs gruppe
> > Michael Wirz
> > Entwicklung
> >
> > Landsberger Straße 57
> > 82266 Stegen am Ammersee
> > Telefon: +49 (0)8143 999 43
> > Telefax: +49 (0)8143 999 49
> >
> > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> > www.eFonds24.de <http://www.eFonds24.de>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail: [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
> >
> > 



-- 
abs IT Service GmbH
abs gruppe
Michael Wirz
Entwicklung

Landsberger Straße 57
82266 Stegen am Ammersee
Telefon: +49 (0)8143 999 43
Telefax: +49 (0)8143 999 49

[EMAIL PROTECTED]
www.eFonds24.de


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to