# Number() not working properly from XML data

**URL:** <https://forum.kirupa.com/t/number-not-working-properly-from-xml-data/203255>\
**Category:** Uncategorized\
**Created:** [October 9, 2006, 3:35pm UTC](https://forum.kirupa.com/t/number-not-working-properly-from-xml-data/203255 "2006-10-09T15:35:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anogar](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@Anogar](https://forum.kirupa.com/u/Anogar)\
**Post date:** [October 9, 2006, 3:35pm UTC](https://forum.kirupa.com/t/number-not-working-properly-from-xml-data/203255/1 "2006-10-09T15:35:28Z")

</div>

I’m having a total brain freeze this Monday morning… ugh. Anyhow. I’m trying to convert a string from an XML file to a number so that I can use it in equations. It isn’t working. What is the proper syntax to do that?

This is the relevent code:

```auto

xArray[z] = xmlNode.childNodes[z].childNodes[2].firstChild;
xDest = xArray[0];
trace(Number(xDest))

```

Not working, it returns NaN. What stupid mistake am I making?
