Descendants matches tags with the same name on different levels. : descendants « XML « Flash / Flex / ActionScript






Descendants matches tags with the same name on different levels.

 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){

        var foo:XML = <a>
                         <b>
                            <c>
                               <b>foo</b>
                            </c>
                         </b>
                      </a>;
        trace(foo..b.toXMLString());

    }
  }
}

        








Related examples in the same category

1.A method form of this operator called descendants(). This function behaves the same way as the double dot:
2.Accessing Ancestors