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.

Help needed with importing XML file which includes 2 tables

Featured Replies

Like most enquiries in this forum I'm very new to XML/XSLT etc. I've read through most of the recent topics regarding XML importing but can't locate any that covers my problem.

I'm getting a third-party XML (web shopping basket order)which includes data from 2 tables (e.g. Order Details & Order Items). I know that I will have to create 2 XSLT files for each part of the XML file. My problem is that I don't fully understand how I create the XSLT to cater for XML file the way it has been supplied.

Anyone out there who may be able to help?

I've added an example XML file based on the data I'm likely to get

Orders.zip

There are a lot of elements here, and, as you say, 2 tables, hence 2 xsl stylesheets. But otherwise is fairly simple. There's only 2 levels, order or order item. And they nicely add the order id again in the order item level (which is not necessary, but it makes it a little easier). These 2 xsl files will import it. You'll need to add all the rest of the fields however.

Orders.xsl.zip

OrderItems.xsl.zip

  • Author

Hi Fenton

The files are exactly what I needed. I'm am extremely grateful and very much appreciate your quick response.

Asking another question: when viewing the Metadata section am I correct to assume this is the area that I should list all the relevant fields in the database that I'm importing into?

Yep, those are what you see in the FileMaker Import dialog, for import order. Each has its own type also, Number, Text, Date, etc.. Though I don't really know what happens if you get one wrong; probably not much.

You shouldn't assume that what the xml calls a "date" is necessarily a FileMaker date; usually the xml data is text, and you post-process or auto-enter with calculation to get a real FileMaker date or timestamp.

When you use FMPXMLRESULT grammar (which you must to import), the Metadata s must be in the same order as the in the . Otherwise your data will go into the wrong field.

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.