1 Reply Latest reply on Apr 20, 2007 6:21 PM by netsesame

    changing value of XML properties

    nkhartabil
      if i have a complex data set
      ex :
      data:XML =
      <name>
      <firstname>N </firstname>
      <lastname>K </lastname>
      </name> ;


      and i want to chage firstname i use data.name.firstname.setChildren("blah") ;
      that will change it , now if i have the following

      s:String = "name.firstname" ;
      items = s.split(".");
      var prop:String = items[0] ;
      for ( var i:int=1;i<items.length;i++ ) {
      prop += "." + items ;
      }
      prop += ".setChildren("+newData+")";

      how can i execute the string prop , since there is no eval() method .