0 Replies Latest reply on Jun 23, 2007 7:22 AM by Dzihan

    E4X Expression drives me mad

    Dzihan Level 1
      Hello all,
      i'm now sitting on a problem for 2 hours and i cannot figure out whats going wrong.
      i got a xmllist containing <item> nodes that contain 2 nodes <id> and <contentType>.
      i need to get the <contentType> text of an <item> with a certain id.

      var str:String = "12345_7890";
      var str2:String = item2.parentId.text().toString();
      trace(str+" - "+str2); //Output: 12345_7890 - 12345_7890

      str and str2 are totally equal of value, only difference is str is hardcoded, str2 is parsed from another xml

      now the odd part:

      var parentContentType:String = contents.(id == str).contentType.text().toString();
      gives me a proper result...

      var parentContentType:String = contents.(id == str2).contentType.text().toString();
      does NOT give me a proper result?!?!

      once again the value of the strings is totally the same, what is going wrong here?!

      Would be glad if someone has a hint, it must have something todo with the Strings but what is it?

      Thanks