1 Reply Latest reply on May 16, 2007 1:45 AM by netsesame

    dynamic xpath

    KUZELJ Level 1

      i would like to dynamically create a xpath expression.
      (see my example)

      var user =
      <Accounts type="LOAD">
      <Account id="007" name="james bond"/>
      <Accounts type="OTHER">
      <Account id="008" name="Goldfinger"/>

      var type_selector = "LOAD";
      var result = user.Accounts.(@type==type_selector).Account;

      the above i would like to yield => <Account id="007" name="james bond"/>.
      but it doesnt.

      i also tried => var result = user.Accounts.(@type=="{type_selector}").Account;
      no luck either.

      can anybody tell me the trick?

      ciao robertj