Thank you for your post.
I have forwarded your entire post to our Development and Software Quality Assurance (Testing) departments for review and confirmation. When information becomes available, I will let you know.
The following information was forwarded to me from our Testing department.
"If I understand correctly, when using a calculation that generates the file path for XML file, you need to use the standard system format, rather than the FileMaker path format. It works if you remove "filewin:/" from the path."
Can you verify?
Thanks for looking into this.
Based on my example from my original post, if I remove "filewin:/", I'm left with "/server/sharename/folder/" & table::field & ".xml". When I modify the script step and run the script, I still receive the same error message. Additionally, if follow what the Testing Department suggests and use Windows Standard System format, I believe I would replace all forward slashed with back slashes. System format on windows to a network share looks like: \\server\share\folder\. I tried this (keeping in mind a backslash comments out the following character in the string), so the syntax for the calculation looks like this: "\\\\" & "server" & "\\" & "share" & "\\" & "folder" & "\\" & table::field & ".xml". When the script is run, the dialogue box displays the path to the network share correctly: \\server\share\folder\file.xml, but it still returns the same error message. In this case, the error message appears as follows:
XML parsing error:
unable to open primary document entity
Line Number: 0
Column Number: 0
I've sent your post back to the Tester for additional comments.
Is there any word on the resolution on this issue? I have a very similar (if not identical) problem with a scripted import of an xml file using FM11. This script worked flawlessly in FM9 & 10 but suddenly "broke" in 11.
The script contains an Import Records script step that specifies the xml and xsl stylesheets paths in script variables using FileMaker supported file path syntax. The xml file & the xsl stylesheet that the script refer to both work fine if I import the file manually using File->Import XML. I've tried various types of syntax using relative and absolute paths but nothing works. I'm getting the same errors as jgraff reports.
Configurations tested: FileMaker 11, FileMaker 11 Advanced; Mac OSX 10.5.8.
Examples of file path syntax that I've tried for the xml data file (all of which work in FM10 & FM9):
file:///volumes/Macintosh HD/username/desktop/shopsite_orders.xml (this is what was originally being used and worked in FM9 & 10)
filemac:/Macintosh HD/Users/username/desktop/shopsite_orders.xml (I tried this to be specific and absolute but it still failed)
as well as a few others. I tried the same syntaxes for the xsl stylesheets.
The database files are hosted and the xml/xsl files are stored locally on the client's machine. However, i've also tested this with the database files opened on the local machine and still get the same errors.
I've been able to successfully use the scripted import if I set the import records script step to show dialogs, then manually change the file reference dialog by clicking on the File... button and navigating to the hard drive to point FM to the correct xml & xsl files.
Please advise if this is a known bug in FM11 or if there's something I'm missing. I have a client who desperately wants to upgrade all of his licenses to 11 but cannot do so until this issue is resolved, since the scripts & file path syntax we've been using work fine in FM10.
-deb : )
WOW. I just realized the problem. When the file is opened in FM11 and I look at the Import Records script step's Specify XML dialog, it shows that the $path variable I'm using was placed in the Specify Calculation option of the specify xml file dialog.
The text below the Specify Calculation button states "File or HTTP request specified by calculation". But when FM 11 goes to evaluate this during the script, it fails. When I run the script and show the Import Records dialog, the Specify XML window pops up and displays the variable $path in the HTTP Request field and not in the File field.
It was then that I decided to put the $path variable in where the File option is (in lieu of typing in an actual file path I typed $path which of course I know works in other file specification dialogs) and saved the script and it worked. Did the same for the xsl file reference and everything worked perfectly.
Why did this change between FM10 & 11 ? Did I miss something? Anyway, all is good now. Hope this helps others.
-deb : )
I apologize for the late reply.
First, I'm glad you found the solution.
Second, our Testing department has confirmed this does indeed fail for remote files, but works correctly for local files. As you discovered, this is a change between FileMaker Pro 10 and FileMaker Pro 11. This has been sent to Development for further review.
I was stuck on this issue all day yesterday. Glad I found the workaround for it. By the way, it wouldn't work for me locally no matter how I configured the file path, I had to use the "File" option instead of the "Calculation" option. Also, I'm still working with FMP 9 Advanced.