Flex sees something that looks like a number in the XML and treats it as
a floating point Number type (since the number in the XML is too big to
fit in an int). Because of the way IEEE floating point works (take a
look if you're interested: http://en.wikipedia.org/wiki/IEEE_754 -- it's
neat), very large and very small numbers lose precision.

The issue has come up on the list before; you can search the archives
for a workaround (I know the cause, but don't know the solution).
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-----Original Message-----
From: cjsutherland <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Bizarre XML data transformation
Date: Wed, 17 Sep 2008 19:09:55 -0000

Once again, I've hit a roadblock with Flex for something that should
be easy as pie.

Here's the problem: I'm loading in an XML feed from Flickr, a list of
photoset IDs. There's nothing wrong or unusual about the XML document. 

I load the XML into an ArrayCollection, and can view all the data just
fine, except the ONE element I need... the ID number. Flex is
screwing it up somehow.

For example, the ID number in the XML file looks like this:
72157607109678346

However, when Flex returns the ID number, it becomes: 72157607109678350

Every ID is changed like that, but it's not consistent. The first
one, 4 is added to the ID. In the next, 12 is subtracted. No rhyme
or reason.

What Flex is doing to this number or why it's doing it escapes me. 
I've tried copying the XML file locally and appending the ID with a
character... it then comes across fine. So Flex thinks the ID is some
kind of number datatype, and manipulating it somehow. 

Any idea how to make Flex cut that out?




 


Reply via email to