You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by Xinjun Chen <xj...@gmail.com> on 2007/07/20 07:35:46 UTC

[AXIOM] Limitation or Bug? Unable to undeclare a default namespace

Hi AXIOM gurus,

I encountered some problem when undeclaring the default namespace in an
OMElement.
I have tried the following ways but all failed. The default namespace is
still in the OMElement. Is this an AXIOM bug or some limitation? Or because
I didn't use API correctly?

#1:
        OMElement reqElement = ....;
        reqElement.declareDefaultNamespace("");

#2:
        OMElement reqElement = ....;
        reqElement.declareNamespace("", "");

#3:
        OMElement reqElement = ....;
        OMFactory omFactory = reqElement.getOMFactory();
        OMNamespace ns = omFactory.createOMNamespace("", "");
        reqElement.declareNamespace(ns);

Could anyone point me a way out? What can I do to undeclare the default
namespace in AXIOM? Thanks for your help in advance.

Regards,
Xinjun