12 Replies Latest reply on Apr 21, 2010 4:38 PM by icecappacino

    How to use E4x namespace

    icecappacino Level 1

      Ok. I have really been researching the use of the E4X usage. However, when it comes to the namespaces issue its ALOT confusion. How do you use E4X with xml with namespaces...


      I have this ATOM feed here


      and I'm using the following code to get the elements


           var ns = new Namespace('ts','http://www.triniscene.com/namespace');
              private function listGalleries(event:ResultEvent) {
                          default xml namespace = ns;
                          var t:XML = event.result as XML;
                          t.ignoreWhiteSpace = true;
                          t.prettyIndent = true;
                          var m = (t.child(6).name());
                          //galleriesListDG.dataProvider = t.channel.item;
                          var d = 1;


      When I use



      I get the whole xml structure which is good





      gives me "http://www.w3.org/2005/Atom" (is that suppose to happen?)


      finally When I try to access



      I get an error/ or nothing....


           When I check the name



      I get


      How can this be? entry is not a namespace tag....its not what is outputted in the XML structure. Why would it give me this?


      What happened to <entry>