# Using XML Data - question about types

**URL:** <https://forum.kirupa.com/t/using-xml-data-question-about-types/183636>\
**Category:** flash\
**Created:** [March 28, 2006, 11:26pm UTC](https://forum.kirupa.com/t/using-xml-data-question-about-types/183636 "2006-03-28T23:26:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ice987](https://avatars.discourse-cdn.com/v4/letter/i/779978/32.png) [@ice987](https://forum.kirupa.com/u/ice987)\
**Post date:** [March 28, 2006, 11:26pm UTC](https://forum.kirupa.com/t/using-xml-data-question-about-types/183636/1 "2006-03-28T23:26:39Z")

</div>

Hello

What’s the best way to integrate xml data so that it is treated as a number

I can declare the following

var val:Number;

and then read the value in from a .xml file

If I do this in the following example, flash seems to convert newVal to a string when I want a number

I assume this is because val is a value read in from a .xml file:

var newVal:Number=0;

for(var i;Number=0;i\<10;i++){

newVal+=5+val;

trace(newVal);}

How can I get flash to treat val as a number and yield a numeric result rather than a string of numbers
