Reading an external information as a number

I need to read an external information from a TXT file or from an XML file, but as a number.
I know Number() should convert string to number, but seems like the XML gives me an array, while I used XPath.selectNodes(durationXML, “/xml/@”)… I used this code:

durationXML = new XML();
durationXML.ignoreWhite = true;
durationXML.onLoad = function() {
    xml_duration = (XPath.selectNodes(durationXML, "/xml/@"));
    run_duration = Number(xml_duration)*1000;
    Description = (xml_duration);

So I decided to have the external information as a text file with the following content:
Then, using the following code to read it:

loadVariablesNum("duration.php?filename=" + run_url, 0);
run_duration = Number(string_duration);
Description = (run_duration);

It doesn’t work… seems like loadVaroablesNum read txt files for putting in dynamic text objects and not for putting in variables, or do I do something wrong?