I just built a script that tackles this issue and ran into a similar issue.
First I created an "import log" table that has a container field. When the user needs to perform an import, I have the script take them there, then add a new record. I think use Set Field to place a reference to the file I want to import into the container field. Once it's in place I use some text processing to grab the full file path and pass it in a variable called $xmlpath to the "File" option in the Import XML Dialog. Don't use the "Calculation" option even though it tells you that you can pass it a text value as a calculation - for what ever reason that will fail. Place the variable in the "File" option dialog box called "Specify File" that lets you create a "File Path List".
Hope this helps.