Could you exemplify with some code snippets maybe? I still don't understand the scenario. The goal of setUseDefaultNamespace is to prevent "ns" appearing in the document when you save it. This particular option can be applied _only_ during serialization (save() or xmlText()).
Note that if XMLBeans parses a document that has xmlns:ns="namespace" then this attribute becomes part of the document and XMLBeans of course won't deleted unless specifically instructed so. Radu On Wed, 2006-10-18 at 15:01 +0100, [EMAIL PROTECTED] wrote: > Hi > > That is correct, I tried setting setUseDefaultNamespace() but it has no effect > after the XmlObject has been serialized and then de-serialized, as the 'ns' > namespace appears to be applied by XmlBeans during serialization. > > Is this a bug? Is it caused by the fact that XmlOptions can't be applied > during > serialization? Ideally the setUseDefaultNamespace() option when using > xmlText() > should have the same outcome both before and after serialization. > > Thanks > > Alex. > > -------------------------- > > Setting XmlOptions.setUseDefaultNamespace() on save() or xmlText() > should accomplish exactly what you need. Is that what you have tried? > > Radu > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Friday, September 29, 2006 2:19 AM > To: [email protected] > Subject: Default namespace and serialization > > Hi > > I have a xmlbeans binding class instance, and I wish to use the default > namespace either when 'saving' the xml or when calling the 'xmlText' > method. In order to do this, I would specify an 'xml option' to use the > default namespace. > > However, if I serialize and then de-serialize the instance, the > resulting instance now uses the 'ns' namespace. > > Of course, once de-serialized in this form, specifying the same 'xml > option' for default namespace has no effect, because the 'ns' namespace > has already been added. > > Is this a bug in xmlbeans? Or would the ability to set 'xml options' for > serialization be classed as an enhancement? > > Thanks > > Alex. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > _______________________________________________________________________ > Notice: This email message, together with any attachments, may contain > information of BEA Systems, Inc., its subsidiaries and affiliated > entities, that may be confidential, proprietary, copyrighted and/or > legally privileged, and is intended solely for the use of the individual > or entity named in this message. If you are not the intended recipient, > and have received this message in error, please immediately return this > by email and then delete it. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > _______________________________________________________________________ Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

