# Data type from XML

**URL:** <https://forum.kirupa.com/t/data-type-from-xml/216022>\
**Category:** flash\
**Created:** [February 13, 2007, 1:51am UTC](https://forum.kirupa.com/t/data-type-from-xml/216022 "2007-02-13T01:51:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aasha](https://avatars.discourse-cdn.com/v4/letter/a/f07891/32.png) [@Aasha](https://forum.kirupa.com/u/Aasha)\
**Post date:** [February 13, 2007, 1:51am UTC](https://forum.kirupa.com/t/data-type-from-xml/216022/1 "2007-02-13T01:51:56Z")

</div>

I’ve pulled in some data into an array but it seems to have pulled everything in as strings. I need to be able to do calculations with some of the data so one element in the array should be a number data type not a string.

Is there a way to assign the data type without using components or to convert the data type?

[SIZE=4] **XML** [/SIZE]  
\<account\>  
\<name\>Cash at bank\</name\>  
\<number\>10\</number\>  
\<value\>108000\</value\> **[COLOR=darkred]\<-- Should be a number[/COLOR]**  
\<type\>debit\</type\>  
display\>true\</display\>  
\</account\>

[SIZE=4] **Actionscript** [/SIZE]  
for (var stringNode:XMLNode = childNode.firstChild; stringNode != null; stringNode = stringNode.nextSibling, j++){  
accountArray\*[j] = stringNode.firstChild.nodeValue;  
}
