1 Reply Latest reply on Jun 17, 2008 10:28 AM by nativeson5150

    XML value being turned into math formula.

    nativeson5150
      I am not using E4X, but here is the scenario:

      Okay, so I am bringing in a string with a value of 33E-30 for Train Id. Java is returning the following XML to my flex component:
      <train>
      <trainId>33E-30</trainId>
      <cars>60</cars>
      <length>3751</length>
      <weight>2712</weight>
      <callTime>null</callTime>
      <comments>null</comments>
      <eta>2007-10-30 05:00:00.0</eta>
      <fromRoad>NS</fromRoad>
      <toRoad>UP</toRoad>
      <interchange>Elkhart (testing)</interchange>
      <locationName>Elkhart (testing)</locationName>
      <trainType>R5</trainType>
      <latitude>41</latitude>
      <longitude>-86</longitude>
      <splc>362120</splc>
      </train>

      I then take the value and put it in a Value Object typed as a String. Flex then displays the following:
      3.2999999999999997e-29

      It looks like Flex is treating this as some mathematical formula instead of as a string, even though it is typed as a string. Any ideas on how to work around this? I am thinking that it is happening when the xml is being read into the object.