JScript & Helper to extract xml value

The line is incorrect:

var f = file.ReadFromFile('fileName');

You are referencing 'fileName' as a string, but it should be a variable. So replace it to this:

var f = file.ReadFromFile(filename);

Also note variable names are case sensitive.

Then, check your file contents has xml first, use dlg.ShowMessage at various points, for example verify the path that is used, verify your file contains the xml. It can be difficult to debug in the script editor so doing this can help a lot.