Limit of 10 characters when we try to extract a integer field in a xml.

Hi!

We have trying to extract an integer field from an xml response, if the field is a string,we get the value from this field but if it is a integer, it doesnt get the value when it has over 10 characters, is there any way to get interger fields from a xml with 10 or more characters?? Any trick?? 

Regards

Rebeca

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    You might consider saving the value as a Decimal type, and simply not displaying the decimal point.  That's how JavaScript does numbers.  There's literally only one numeric type in the entire programming language.

    That will get you over 9 quadrillion.  At some point after that, it looses so much accuracy that you can only store every even integer up to about 16 quadrillion.

    A better question might be what you need 10 digit integers for, and whether integer is really the type you need.  Do you need to perform math on them?

Reply
  • 0
    Certified Lead Developer

    You might consider saving the value as a Decimal type, and simply not displaying the decimal point.  That's how JavaScript does numbers.  There's literally only one numeric type in the entire programming language.

    That will get you over 9 quadrillion.  At some point after that, it looses so much accuracy that you can only store every even integer up to about 16 quadrillion.

    A better question might be what you need 10 digit integers for, and whether integer is really the type you need.  Do you need to perform math on them?

Children