This problem, per the documentation, is attributed to
calling a setXXX method on your XmlBean objects and assigning a null value. If
you don't want the elements to appear in your document then you should not call
the setXXX method passing in a null. If the null has been assigned and you do
not want the element to appear in the document you need to invoke the unsetXXX
method. While this make sense to me it is damn inconvenient. I wish that there
were an XmlOption that I could apply that would remove empty elements from the
document.
From: Ran <[EMAIL PROTECTED]> [mailto:Ran <[EMAIL PROTECTED]>]
Sent: Monday, January 08, 2007 9:32 PM
To: [email protected]
Subject: Re: How to prevent xsi:nil="true" from being created
Let me know if you found anything.
Thanks,
ran
On 1/8/07, [EMAIL PROTECTED]
<[EMAIL PROTECTED]>
wrote:
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]I am creating a new XmlObject from the factory method. I'm adding the appropriate objects throughout the document but some of the elements are defined as optional per the schema. When I am done composing the document and I save/parse the document the optional elements are place into the document as follows:<ContactInformation xsi:nil="true" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"/>How do I eliminate these elements from appearing in the document?Thanks....Chris Mathrusse(925) 236-5553
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

