0 Replies Latest reply on May 2, 2007 1:05 AM by holla2040

    mxml e4x binding any descendant with @id == value

      Here's my simple XML data
      d = XML
      <test attr="testAttr">
      <value id='9'>9 value</value>

      I want to bind to the value element with id=9 without specifying the complete path. Here's what I've tried

      <mx:Text text="{d..(@id == 9)}" />
      <mx:Text text="{d..*.(@id == 9)}" />
      <mx:Text text="{d.descendants(@id == '9')} />

      I either have compiler errors or the binding returns nothing. Can anyone help?

      This example is simple. My actual xml data is quite large and I have no idea the paths to required elements. I do know the id's though. So I'd like to bind in mxml to XML elements by id but can't figure out the E4X syntax.