Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Import Error with XML File

Featured Replies

I have a script that downloads, via FTP using the SmartPill PHP plugin, a set of XML files. I've written an XSLT stylesheet to transform this into the FMPXMLRESULT XML that FileMaker expects when importing an XML file. If I have downloaded the file and import it manually it works. If I have the SmartPill PHP plugin download the file (saving it to /private/tmp/ on Mac OS X Leopard with FileMaker 10, BTW), it imports successfully. However, when I try to import the file within a script, the Import script step gives the following error: "XML Parsing error: An exception occured! Type:SMLPlatformException, Message, Could not open file: filemac:/Half Dome/private/tmp/3660.xml, Line Number: 0, Column Number: 0"

Again, going to the exact same file manually and importing it and using the exact same XSLT stylesheet is successful.

Any suggestions?

Thanks,

Chuck

  • 2 weeks later...
  • Author

Well, this seems to be a first. No one knows anything? :( Perhaps some additional information will help.

First of all, the file path of the Import Records script step is set via a variable.

Second, if I create a different script an include an Import Records step and manually select the file rather than have it be set with a variable, no error occurs. It imports successfully.

Given those two facts, I may simply download via FTP, name the file to some known name, and see if that works, but it seems like a workaround rather than a solution.

What happens if you try downloading to, and importing from, the desktop instead of the temp folder?

  • Author

Well, I did try my home folder rather than the tmp folder, and the result was the same.

Well, I don't know. I would run more tests trying to eliminate possible causes, but it's hard to do that by posts. I don't know where your stylesheet is, and how you point at it, for example - and that too could be a factor.

  • 1 month later...

Hi Chuck

I have come across the same problem and noticed something after scratching my head for a day that will hopefully shed some light.

I use plug-in for listing files in folder and then processing each XML file contained.

If I write script that specifies "File" to be used and prompt for comfirmation - rather than no prompt - and select a file, then it applies XSLT and imports data.

However, if I specify the field via "Calculation" then it doesn't. It appears to expect a HTTP Request from that Calculation and not just text, although it says that the calculation is either HTTP Request or File.

I have written many scripts to check the file exists and it is the same path as a manually selected file, so I can only surmise either:

1. Undocumented (or missed documentation) syntax for Calculation for file

2. There's a bug in there.

Please can someone help. I'm stuck otherwise.

  • 3 weeks later...

I have the same problem there, a happy note saying

XML-Parsing-Error: An exeption occured! Type:XMLPlatformException, Message:Could not Open File "POST HTTP://..."

LineNumber 0

Column Number 0

but as you see from the Message, I'm trying to use it with a HTTP-Request (which is tested and working!) and I'm not using any Plug-Ins (I'm against it :) )

But Filemaker doesn't even try to connect to the Server provided in the HTTP-Request.

Has anyone ever had success with such a HTTP-Request?? Or am I getting something completely wrong?

(I am trying to send a SOAP-(HTML)-Request to a webservice from which the response is transformed with a existing xslt and imported to FM)

AFAIK, you can only use a GET request (in the form of a URL), not POST.

Oh.... It would have been too nice... I was already suspicious, because I've never read about somebody interacting between FM and SOAP like this, now I know why...

But a local php will help.

I'd say to call that field "HTTP-Request" is a bit exaggerated by our dear friends @ FileMaker's :)

But thank's Comment you've helped me saving a lot of time!!

Well it IS a HTPP request - one kind out of many. Mind you, I don't KNOW for sure that it cannot take a POST request - but if it does, I haven't been able to figure out in what form. These things are completely undocumented.

I suggest you submit a feature request to FMI. They have neglected the XML aspect ever since it came out, and the more people complain about this, the higher priority it will get:

http://www.filemaker.com/company/feature_request.html

http://forum-en.filemaker.com/fm/board?board.id=fdbk2

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.