# Variables, XML, naming help!

**URL:** <https://forum.kirupa.com/t/variables-xml-naming-help/223624>\
**Category:** flash\
**Created:** [April 24, 2007, 1:56pm UTC](https://forum.kirupa.com/t/variables-xml-naming-help/223624 "2007-04-24T13:56:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![p\_due18](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/p_due18/32/347_2.png) [@p\_due18](https://forum.kirupa.com/u/p_due18)\
**Post date:** [April 24, 2007, 1:56pm UTC](https://forum.kirupa.com/t/variables-xml-naming-help/223624/1 "2007-04-24T13:56:31Z")

</div>

Hi Guys, I’m stuck!

I’m trying to do some stuff with XML and variables.  
What I’m stuck doing is being able to use the \* from an XML file and using this to reference to a variable.

Declare variables:

```auto

var myNumber = 0;
var qScore1 = 5;
var qScore2 = 1;
var qScore2 = 3;

```

Load XML and do calculations:

```auto
function loadXML(loaded) {
	if (loaded) {
		allData = this.firstChild.childNodes;
		for (var i = 0; i<allData.length; i++) {
			**[COLOR="Red"]//myNumber += qScore*;[/COLOR]**
		}
	} else {
  		trace("XML file not loaded!");
	}
}

```

I just need to be able to get this line working (myNumber += qScore\*;).

If anyone can help it’ll stop me from tearing ALL my hair out, what I have left!!
