title: How can I remove a namespace from an XML document?
body: <p>In my Flex application, I call several .NET WebServices that return XML. However, these WebServices all return XML with a namespace. I cannot read/parse the XML without referencing the namespace, meaning that I have to include the following lines of code in each Class that calls a WebService:</p>
  
  <pre><code>private namespace PCRWebServices = "xxx.somename.web.services";
  
  use namespace PCRWebServices;
  </code></pre>
  
  <p>I would like to eliminate the need for this static/hard-coded logic simply to read XML from a WebService.</p>
  
  <p>Is there any way to "remove" the namespace from the XML, so that I can read it as a "normal" XML document?</p>
  
  <p>I have a Class that I extend for every WebService call that handles results and faults:</p>
  
  <pre><code>private function faultHandler(event:FaultEvent):void
  {
  
  }
  
  private function resultHandler(event:ResultEvent):void
  {
      var resultXML:XML = new XML(event.result);
  }
  </code></pre>
  
  <p>I would like to add some logic to the result handler to "convert" the XML. Any ideas?</p>
  
  <p>This what <code>trace(resultXML)</code> returns:</p>
  
  <pre><code>&lt;GetDataResult xmlns="xxx.somename.web.services"&gt;
    &lt;DataSet&gt;
      &lt;Data&gt;
        &lt;IdNmb&gt;15&lt;/IdNmb&gt;
        &lt;NameTxt&gt;Hello&lt;/NameTxt&gt;
      &lt;/Data&gt;
      &lt;Data&gt;
        &lt;IdNmb&gt;16&lt;/IdNmb&gt;
        &lt;NameTxt&gt;World&lt;/NameTxt&gt;
      &lt;/Data&gt;
      &lt;Status&gt;
        &lt;Status&gt;Success&lt;/Status&gt;
      &lt;/Status&gt;
      &lt;ReturnCode&gt;
        &lt;ReturnCode&gt;0&lt;/ReturnCode&gt;
      &lt;/ReturnCode&gt;
    &lt;/DataSet&gt;
  &lt;/GetDataResult&gt;
  </code></pre>