logo       

issue with namespace: msg#00033

text.xml.xmlbeans.user

Subject: issue with namespace


Hi,
I have a following XML

<outer:Node1 xmlns:outer="http://service.wf.com/outer";
xmlns:inner="https://service.wf.com/inner";>

<inner:Node2>
sometext
</inner:Node2>
<abc> </abc>
<def> </def>

</outer:Node1>

How can I instruct XMLBeans to just remove the namespace only for inner and
not for the outer ?
I tried all the permutation and combinations but without any luck.

--------------------------------------------------------------------------------
nameSpaceMap.put("https://service.wf.com/inner","";);
xmlOpts.setSaveAggressiveNamespaces();
xmlOpts.setSaveSuggestedPrefixes(namespaceMap);
------------------------------------------------------------------------------

when I execute the above code, I get the desired behaviour but it introduces
empty name space references for all the node that have default namespace. In
the above example, I get the following output

<outer:Node1 xmlns:outer="http://service.wf.com/outer";
xmlns:inner="https://service.wf.com/inner";>

<Node2>
sometext
<Node2>
<abc xmlns=""> </abc>
<def xmlns=""> </def>

</outer:Node1>

the nodes abc and def have references to "" namespace. How do I solve this
problem ? any workaround or any ideas.

Could you please throw some light on this.?

your help is highly appreicated.

Thanks


--
View this message in context:
http://www.nabble.com/issue-with-namespace-tf2676569.html#a7464923
Sent from the Xml Beans - User mailing list archive at Nabble.com.


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise