I'm trying to save a document with a default namespace, but XMLBeans keeps
inserting a named namespace ("xb") into nested elements.

What I want:

    <Example xmlns="http://example.com";
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
        <BaseType xsi:type="DerivedType"/>
    </Example >

What I get from XMLBeans:

    <Example xmlns="http://example.com";
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
        <BaseType xsi:type="xb:DerivedType" xmlns:xb="http://example.com"/>
    </Example >

I've tried various combinations of XMLOptions when saving to no avail, such
as:

    Map namespaces = new HashMap();
    namespaces.put("http://example.com";, "");
    
    XmlOptions options = new XmlOptions();
    options.setSaveSuggestedPrefixes(namespaces);
    options.setSaveAggressiveNamespaces();
    options.setUseDefaultNamespace();

Any suggestions would be appreciated. Thanks,

Mike
-- 
View this message in context: 
http://www.nabble.com/XMLBeans-Inserting-Unwanted-Namespace-tf1862224.html#a5086582
Sent from the Xml Beans - User forum at Nabble.com.


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

Reply via email to