Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7347 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

I'm having a couple of problems in scripting an XML (with XSLT) import, any help would be much appreciated.

The 1st problem is not a big deal but annoying: If I use a Calculated path for the XML file (e.g. "filemac:/Public/"&id_number&"/result.xml") FileMaker errors with 'could not open file', a direct pointer to the file works fine though. With 'perform without dialog' off the correct file path appears in the 'HTTP request' box, rather than in the 'File' select. Very odd.

The other problem is that the XML files I am importing only have a subset of all the possible tags at any one time. The database I have set up has fields for all the available inputs. I was hoping that setting 'Arrange by matching names' in the import order dialog and setting 'Perform without dialog' would mean that the script would import all the available data into the matching field names. However the reality is that I only get one of the hundred or so fields imported :-/

Posted

Problem 1:

Specify the file path using Unix paths, not mac paths

Problem 2:

It works with FM 6 no prob, haven't tested FM7 with this yet. May be an error in your XSLT.

  • Newbies
Posted

Thanks for the reply.

Problem 1: I have tried "filemac://Public/", "file://Public/" and "/Public/". Always the same error :-/

Problem 2: I can manually import one of the XML files with the XSLT so I would reckon it's working fine.

As a clarification I am pointing the import within the script to a results.xml file which at first has about 10 of the 100 or so entries. If I then replace the results.xml file with a different one (which has a different subset of the 100 fields) hoping that the 'matching names' would stick and all the fields would be imported. Instead the actual mapping appears to be sticking. Any more thoughts?

This topic is 7347 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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