3 Replies Latest reply on Apr 23, 2009 4:19 PM by ntsiii

    Tree Control and XML  attribute "@label' problem...


      I am building a Flex 3 navigation menu in a Flex component that uses:


      A treeMenu component

      An xml data provider with a "label" element


      When the tree menu "label"element is clicked, an "if" statement presents a "view" from  a viewStack component based on the element name "@label"


      My Problem:  If the  <node label="Basic_Search"/> -like nodes include an underscore in the label name, I the presented view online shows the underscore...and unless I totally rewrite my "onTreeSelected" function, I can't find a workable solution to the underscore dilema.



      previewStack.selectedChild =

      this[p_evt.currentTarget.selectedItem.@label + "Preview"];





      <mx:XML xmlns="" id="treeData2" >


      <node label="Searching For Wilo Books">


           <node label="Basic_Search"/>

           <node label="Advanced_Search"/>






      Does Flex include a simple statement like:  xml = "ignoreWhitespace" ---such as in Flash? As you can see, I'm looking for an easy solution here, and trying to avoid recoding the function in the component.