0 Replies Latest reply on Feb 1, 2007 9:39 AM by 187_2007

    XML- select a apecific type

    187_2007
      I have this XML sheet.

      <Mainparent label="AOL">
      <child label="AOl Technologies" isBranch="true"/>
      <parent label="Aol Sports">
      <child label="Football"/>
      <child label="Basketball"/>
      <child label="Soccer"/>
      <child label="Curling"/>
      </parent>
      </Mainparent>


      I want to perform an action ONLY if it is a child that I select. not a parent ot Mainparent...

      In ActionScript I have this:

      var selectedNode:Object = event.target.selectedItem;
      trace(selectedNode.@label);


      How do I grab the name PARENT or CHILD?
      In other words, I want to perform an action on the leaf of the tree not any branches...