You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by temp temp <mi...@yahoo.com> on 2007/03/17 01:25:41 UTC

How to strip namespace prefix

I want to strip namespace prefix when I create string out of my xml here is what I get  
   <ent:service namespace="ognt" xmlns:ent="http://reisys.com/fema/ognt/schema/entity">
    <ent:entity-definition>
      <ent:entity name="application">
      </ent:entity>
    </ent:entity-definition>
  </ent:service>
  
   and here is what I want
  <service namespace="ognt" xmlns:ent="http://reisys.com/fema/ognt/schema/entity">
      <entity-definition>
        <entity name="application">
        </entity>
      </entity-definition>
    </service>
  
 
---------------------------------
8:00? 8:25? 8:40?  Find a flick in no time
 with theYahoo! Search movie showtime shortcut.

Re: How to strip namespace prefix

Posted by Jacob Danner <ja...@gmail.com>.
If I understand this right, you want to go from a qualified instance
to an unqualified instance? Will a call to
XmlObject.xmlText().replaceAll("ent:","") work?

Or did you want the elements in the default namespace?

-Jacobd

On 3/16/07, temp temp <mi...@yahoo.com> wrote:
> I want to strip namespace prefix when I create string out of my xml here is
> what I get
>   <ent:service namespace="ognt"
> xmlns:ent="http://reisys.com/fema/ognt/schema/entity">
>    <ent:entity-definition>
>      <ent:entity name="application">
>      </ent:entity>
>    </ent:entity-definition>
>  </ent:service>
>
>   and here is what I want
>  <service namespace="ognt"
> xmlns:ent="http://reisys.com/fema/ognt/schema/entity">
>    <entity-definition>
>      <entity name="application">
>      </entity>
>    </entity-definition>
>  </service>
>
>
>  ________________________________
> 8:00? 8:25? 8:40? Find a flick in no time
>  with theYahoo! Search movie showtime shortcut.
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org