0 Replies Latest reply on Sep 14, 2006 7:21 PM by NileShanaghan

    Removing Default Namespaces from XML

      Hi All,

      I am having a situation where I can't remove the default namespace from XML mainly
      because there is no namespace prefix.

      I hope this code snipped makes better sense.

      function test():void
      document:XML =
      <test xmlns:soap=" http://example.com" xmlns=" http://swanmokshi.com">
      <item>JK Angel</item>
      // I can remove the soap namespace by doing the following
      soap:Namespace = document.namespace("soap");

      Alert.show(document.toXMLString()); // should now display the xml document without the soap namespace


      Note that removing the soap namespace is easy because of the first namespace is named "soap". How do
      I removed the unnamed namespace, xmlns=" http://swanmokshi.com" ?