1 Reply Latest reply on Nov 2, 2007 8:41 AM by snafu7x7

    Ignoring XML namespaces?

    snafu7x7
      Say I have a webservice call that returns this XML:

      <Response xmlns=" http://mysite.someurl.com">
      <node1>
      <node2>
      <node3>Some Value</node3>
      </node2>
      </node1>
      </Response>

      Because of the namespace, to get at the value of the <node3> node I need to do this:

      var ns:Namespace = new Namespace(" http://mysite.someurl.com");
      var xml:XML = XML(event.result);
      var textValue:String = xml.ns::node1.ns::node2.ns::node3;

      If you have a deeply nested XML document this gets syntactically messy and difficult to read quickly. Is there any way to get rid of that namespace in AS so I can just use it with standard dot notation, like:

      xml.mode1.node2.node3

      thank you!