6 Replies Latest reply on Jul 27, 2007 6:36 AM by kleber.kiefer

    E4X - all nodes of one xml

    kleber.kiefer
      Hello guys,

      Can somebody help me???
      I need all nodes of one xml that <system> element equals "SystemOne".

      private function initApp():void {
      var xmlTemp:XML =
      <interfaces>
      <xinterface>
      <name>firstInterface</name>
      <team>TeamOne</team>
      <systems>
      <system>
      <name>SystemOne</name>
      </system>
      <system>
      <name>SystemTwo</name>
      </system>
      </systems>
      </xinterface>
      <xinterface>
      <name>secondInterface</name>
      <team>TeamTwo</team>
      <systems>
      <system>
      <name>SystemOne</name>
      </system>
      <system>
      <name>SystemTwo</name>
      </system>
      <system>
      <name>SystemThree</name>
      </system>
      </systems>
      </xinterface>
      </interfaces>;

      var xmlFind:XML = xmlTemp.xinterface.systems.system.(name=='SystemOne').parent().parent();

      But this don't work... return error (TypeError: Error #1010: A term is undefined and has no properties.)

      Thank a lot!!!

      Kleber