Loading Data from XMl file and uses it to run an If Statement. If Statement fails

[Flash CS3 (Flash 8 available as well)]
[Actionscript V2 (AS3 Not available for this project. End result must be in AS2. Plus I haven’t learned AS3 yet)]

Hi

Sorry about running two posts so close together, but I couldn’t change the other one to reflect the changes I’ve made in my problem.

The 1st post dealt with my theory that my IF statement wasn’t written correctly, and so failed. But I’ve since disproved that.

Okay here is the situation.
I isolated elements from a larger app that I’m putting together and the problem still followed.
The Flash movie contains 2 Text files, one Component button, and 1 component checkbox.
The purpose of the application is to load an XML file(works)
Populate 2 text fields with information from the XML file(works)
Compare the two text fields, if they contain the same information then the checkbox, via AS is told to be selected. (Heres the problem);

Heres the code:

runCode_btn.onPress = function() {
		
	data_xml = new XML(); 
	data_xml.ignoreWhite = true; 
	data_xml.onLoad = function(success) { 
  		if (success) { 
    			//point to the first node with information 
    			var track_xml = data_xml.firstChild; 
    			//loop through each node 
    			while (track_xml != null) { 
 		 	    //print out each node 
 			     test1 = track_xml.toString();
  			    //point to the next node 
  			    track_xml = track_xml.nextSibling;
				
				//Runs my code
				
				//Define the contents of two text fields located in the movie
				textOne = data_xml.firstChild.childNodes[3].firstChild;
				textTwo = data_xml.firstChild.childNodes[5].firstChild;
				trace("data_xml.firstChild.childNodes[3].firstChild = " + data_xml.firstChild.childNodes[3].firstChild);
				trace("data_xml.firstChild.childNodes[5].firstChild = " + data_xml.firstChild.childNodes[5].firstChild);
				/*dummyYes = data_xml.firstChild.childNodes[5].firstChild;
				dummyNo = data_xml.firstChild.childNodes[6].firstChild;
				dummyMaybeEmail = data_xml.firstChild.childNodes[3].firstChild;
				dummyMaybeFax = data_xml.firstChild.childNodes[4].firstChild;*/
				
				//Checks between the two text fields for a match
				if (textOne == textTwo) {
					trace("It is selected!" + textOne + "    " + textTwo);
					check_fax.selected = true;
				} else {
					trace("Ir is NOT selected!" + textOne + "    " + textTwo);
					check_fax.selected = false;
				};
	 
    
    			}
  	} else { 
   		 trace("error reading file"); 
  	}
	
	delete data_xml;
	
};

data_xml.load("XML/dummy2 - email.xml");

};

After you read the code, you’ll have noticed the trace commands I stuck in there.
They send this to the output panel:

data_xml.firstChild.childNodes[3].firstChild = 1
data_xml.firstChild.childNodes[5].firstChild = 1
Ir is NOT selected!1    1

So as far as I can see, it reads the XML file with no problems, it loads the text fields with no problem. But for some reason the IF statement refuses to recognize that both the XML nodes contain the same information.

If I alter the code like so:

textOne = 1;
textTwo = 1;

Then the IF statement works. It sees that the two text fields are identical in content, and the checkbox is selected.

So whats wrong with the Data from the XML file?
I haven’t a clue.
I tried converting from a string to a Numeral using:

newText = Number(textOne);

But that didn’t work, it just produced “NaN” when traced.
I tried populating the XML file with text versus numbers, still no luck.
[SIZE=“1”]What came from the trace:[/SIZE]

data_xml.firstChild.childNodes[3].firstChild = hi
data_xml.firstChild.childNodes[5].firstChild = hi
Ir is NOT selected!hi    hi

The idea behind this app is that its an electronic form. The user fills it out, the information is then sent to a newly created XML file, months later the open the XML file in flash, and Flash fills out text fields and check and or unchecks Checkboxes based on the XML data.
CheckBoxes are mandatory.
But I don’t see how I’ll be able to use them if i can’t create and condition statements based on the loaded Data.

I’d really appreciate some help and suggestions with this, I think I’m out of ideas.

Thanks

-Lem